Versions in this module Expand all Collapse all v1 v1.0.0 Jun 15, 2021 Changes in this version + const CompressTypeGzip + const CompressTypeNoop + const CompressTypeSnappy + const CompressTypeZlib + func Compress(compressorType int, in []byte) ([]byte, error) + func Decompress(compressorType int, in []byte) ([]byte, error) + func Estimate(b []byte) float64 + func RegisterCompressor(compressType int, s Compressor) + func ShannonEntropyBits(b []byte) int + type Compressor interface + Compress func(in []byte) (out []byte, err error) + Decompress func(in []byte) (out []byte, err error) + func GetCompressor(compressType int) Compressor + type GzipCompress struct + func (c *GzipCompress) Compress(in []byte) ([]byte, error) + func (c *GzipCompress) Decompress(in []byte) ([]byte, error) + type NoopCompress struct + func (c *NoopCompress) Compress(in []byte) ([]byte, error) + func (c *NoopCompress) Decompress(in []byte) ([]byte, error) + type SnappyCompress struct + func (c *SnappyCompress) Compress(in []byte) ([]byte, error) + func (c *SnappyCompress) Decompress(in []byte) ([]byte, error) + type ZlibCompress struct + func (c *ZlibCompress) Compress(in []byte) ([]byte, error) + func (c *ZlibCompress) Decompress(in []byte) ([]byte, error)