Versions in this module Expand all Collapse all v1 v1.0.0 Jun 15, 2021 Changes in this version + const BlockSizeMax + var ErrIncompressible = errors.New("input is not compressible") + var ErrMaxDecodedSizeExceeded = errors.New("maximum output size exceeded") + var ErrTooBig = errors.New("input too big") + var ErrUseRLE = errors.New("input is single value repeated") + func Compress1X(in []byte, s *Scratch) (out []byte, reUsed bool, err error) + func Compress4X(in []byte, s *Scratch) (out []byte, reUsed bool, err error) + type Decoder struct + func (d *Decoder) Decompress1X(dst, src []byte) ([]byte, error) + func (d *Decoder) Decompress4X(dst, src []byte) ([]byte, error) + type ReusePolicy uint8 + const ReusePolicyAllow + const ReusePolicyMust + const ReusePolicyNone + const ReusePolicyPrefer + type Scratch struct + MaxDecodedSize int + MaxSymbolValue uint8 + Out []byte + OutData []byte + OutTable []byte + Reuse ReusePolicy + TableLog uint8 + WantLogLess uint8 + func ReadTable(in []byte, s *Scratch) (s2 *Scratch, remain []byte, err error) + func (s *Scratch) Decoder() *Decoder + func (s *Scratch) Decompress1X(in []byte) (out []byte, err error) + func (s *Scratch) Decompress4X(in []byte, dstSize int) (out []byte, err error) + func (s *Scratch) TransferCTable(src *Scratch)