Documentation ¶
Index ¶
Constants ¶
View Source
const ZSTD_LEVEL = 1 // fastest
ZSTD_LEVEL compression level used by Zstd
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compressor ¶
type Compressor interface { Name() string CompressBound(int) int Compress(dst, src []byte) (int, error) Decompress(dst, src []byte) (int, error) }
Compressor interface to be implemented by a compression algo
func NewCompressor ¶
func NewCompressor(algr string) Compressor
NewCompressor returns a struct implementing Compressor interface
type LZ4 ¶
type LZ4 struct{}
LZ4 implements Compressor using LZ4 library
func (LZ4) CompressBound ¶
CompressBound max size of compressed data
func (LZ4) Decompress ¶
Decompress using LZ4 algorithm
type ZStandard ¶
type ZStandard struct {
// contains filtered or unexported fields
}
ZStandard implements Compressor interface using zstd library
func (ZStandard) CompressBound ¶
CompressBound max size of compressed data
func (ZStandard) Decompress ¶
Decompress using Zstd
Click to show internal directories.
Click to hide internal directories.