Versions in this module Expand all Collapse all v0 v0.1.0 Aug 17, 2026 Changes in this version + const LevelBest + const LevelDefault + const LevelFastest + const LevelNone + func Compress(alg Algorithm, data []byte, level int) ([]byte, error) + func Decompress(alg Algorithm, data []byte) ([]byte, error) + func FlateCompress(data []byte, level int) ([]byte, error) + func FlateDecompress(data []byte) ([]byte, error) + func GzipCompress(data []byte, level int) ([]byte, error) + func GzipCompressDefault(data []byte) ([]byte, error) + func GzipCompressStream(w io.Writer, r io.Reader, level int) error + func GzipDecompress(data []byte) ([]byte, error) + func GzipDecompressStream(w io.Writer, r io.Reader) error + func LZ4Compress(data []byte) ([]byte, error) + func LZ4Decompress(data []byte) ([]byte, error) + func NewGzipReader(r io.Reader) (*gzip.Reader, error) + func NewGzipWriter(w io.Writer, level int) (*gzip.Writer, error) + func Ratio(original, compressed int) float64 + func SnappyCompress(data []byte) ([]byte, error) + func SnappyDecompress(data []byte) ([]byte, error) + func ZlibCompress(data []byte, level int) ([]byte, error) + func ZlibDecompress(data []byte) ([]byte, error) + func ZstdCompress(data []byte) ([]byte, error) + func ZstdDecompress(data []byte) ([]byte, error) + type Algorithm string + const AlgFlate + const AlgGzip + const AlgLZ4 + const AlgSnappy + const AlgZlib + const AlgZstd + func BestAlgorithm(data []byte) (Algorithm, []byte, error)