Versions in this module Expand all Collapse all v1 v1.2.10 Dec 12, 2025 Changes in this version + var ErrDecompressedMsgTooLarge = errors.New("decompressed msg too large") + var ErrInvalidMaxSizeCompressor = errors.New("invalid compressor max size") + var ErrMsgTooLarge = errors.New("msg too large to be compressed") + type Compressor interface + Compress func([]byte) ([]byte, error) + Decompress func([]byte) ([]byte, error) + func NewGzipCompressor(maxSize int64) (Compressor, error) + func NewNoCompressor() Compressor + func NewZstdCompressor(maxSize int64) (Compressor, error) + func NewZstdCompressorWithLevel(maxSize int64, level zstd.EncoderLevel) (Compressor, error) + type Type byte + const TypeNone + const TypeZstd + func TypeFromString(s string) (Type, error) + func (t Type) MarshalJSON() ([]byte, error) + func (t Type) String() string