compressor

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compressor

type Compressor interface {
	Encode(src []byte) ([]byte, error)
	Decode(str []byte) ([]byte, error)
}

func Get

func Get(c api.Compressor) (Compressor, error)

type GzipCompressor

type GzipCompressor struct {
}

func NewGzipCompressor

func NewGzipCompressor() *GzipCompressor

func (*GzipCompressor) Decode

func (c *GzipCompressor) Decode(src []byte) ([]byte, error)

func (*GzipCompressor) Encode

func (c *GzipCompressor) Encode(src []byte) ([]byte, error)

type LzoCompressor

type LzoCompressor struct {
}

func NewLzoCompressor

func NewLzoCompressor() *LzoCompressor

func (*LzoCompressor) Decode

func (c *LzoCompressor) Decode(src []byte) ([]byte, error)

func (*LzoCompressor) Encode

func (c *LzoCompressor) Encode(src []byte) ([]byte, error)

type NoneCompressor

type NoneCompressor struct {
}

NoneCompressor do nothing

func NewNoneCompressor

func NewNoneCompressor() *NoneCompressor

func (*NoneCompressor) Decode

func (c *NoneCompressor) Decode(src []byte) ([]byte, error)

Decode do nothing: output is equal to input

func (*NoneCompressor) Encode

func (c *NoneCompressor) Encode(src []byte) ([]byte, error)

Encode do nothing: output is equal to input

type SnappyCompressor

type SnappyCompressor struct {
}

func NewSnappyCompressor

func NewSnappyCompressor() *SnappyCompressor

func (*SnappyCompressor) Decode

func (c *SnappyCompressor) Decode(src []byte) ([]byte, error)

func (*SnappyCompressor) Encode

func (c *SnappyCompressor) Encode(src []byte) ([]byte, error)

type ZstdCompressor

type ZstdCompressor struct {
}

func NewZstdCompressor

func NewZstdCompressor() *ZstdCompressor

func (*ZstdCompressor) Decode

func (c *ZstdCompressor) Decode(src []byte) ([]byte, error)

func (*ZstdCompressor) Encode

func (c *ZstdCompressor) Encode(src []byte) ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL