Documentation ¶
Overview ¶
Package iguana implements a Lizard-derived compression/decompression pipeline
Package iguana implements a Lizard-derived compression/decompression pipeline
Index ¶
- Constants
- func ANS1Decode(src []byte, dstLen int) ([]byte, error)
- func ANS1DecodeExplicit(src []byte, tab *ANSDenseTable, dstLen int, dst []byte) ([]byte, error)
- func ANS32Decode(src []byte, dstLen int) ([]byte, error)
- func ANS32DecodeExplicit(src []byte, tab *ANSDenseTable, dstLen int, dst []byte) ([]byte, error)
- func ANSNibbleDecode(src []byte, dstLen int) ([]byte, error)
- func ANSNibbleDecodeExplicit(src []byte, tab *ANSNibbleDenseTable, dstLen int, dst []byte) ([]byte, error)
- type ANS1Encoder
- type ANS32Encoder
- type ANSDenseTable
- type ANSNibbleDenseTable
- type ANSNibbleEncoder
- type ANSNibbleStatistics
- type ANSStatistics
- type Decoder
- type Encoder
- type EncodingMode
- type EncodingRequest
- type EntropyMode
Constants ¶
const (
DefaultEntropyRejectionThreshold = 1.0
)
Variables ¶
This section is empty.
Functions ¶
func ANS1DecodeExplicit ¶
func ANS32DecodeExplicit ¶
func ANSNibbleDecodeExplicit ¶
Types ¶
type ANS1Encoder ¶
type ANS1Encoder struct {
// contains filtered or unexported fields
}
func (*ANS1Encoder) EncodeExplicit ¶
func (e *ANS1Encoder) EncodeExplicit(src []byte, stats *ANSStatistics) ([]byte, error)
type ANS32Encoder ¶
type ANS32Encoder struct {
// contains filtered or unexported fields
}
func (*ANS32Encoder) EncodeExplicit ¶
func (e *ANS32Encoder) EncodeExplicit(src []byte, stats *ANSStatistics) ([]byte, error)
type ANSDenseTable ¶
type ANSDenseTable [ansWordM]uint32
type ANSNibbleDenseTable ¶
type ANSNibbleDenseTable [ansNibbleWordM]uint32
type ANSNibbleEncoder ¶
type ANSNibbleEncoder struct {
// contains filtered or unexported fields
}
func (*ANSNibbleEncoder) EncodeExplicit ¶
func (e *ANSNibbleEncoder) EncodeExplicit(src []byte, stats *ANSNibbleStatistics) ([]byte, error)
type ANSNibbleStatistics ¶
type ANSNibbleStatistics struct {
// contains filtered or unexported fields
}
func NewANSNibbleStatistics ¶
func NewANSNibbleStatistics(src []byte) *ANSNibbleStatistics
NewANSNibbleStatistics computes an ANS frequency table on the buffer src.
func (*ANSNibbleStatistics) Encode ¶
func (s *ANSNibbleStatistics) Encode(dst []byte) []byte
Encode appends the serialized representation of the statistics s to the buffer dst and returns the extended buffer.
type ANSStatistics ¶
type ANSStatistics struct {
// contains filtered or unexported fields
}
func NewANSStatistics ¶
func NewANSStatistics(src []byte) *ANSStatistics
NewANSStatistics computes an ANS frequency table on the buffer src.
func (*ANSStatistics) Encode ¶
func (s *ANSStatistics) Encode(dst []byte) []byte
func (*ANSStatistics) EncodeFull ¶
func (s *ANSStatistics) EncodeFull(dst []byte) []byte
EncodeFull appends the full serialized representation of the statistics s to the buffer dst and returns the extended buffer.
func (*ANSStatistics) EncodePartial ¶
func (s *ANSStatistics) EncodePartial(dst []byte) []byte
EncodePartial appends a partial serialized representation of the statistics s to the buffer dst and returns the extended buffer.
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder is a stateless decoder for iguana-compressed data. The zero value of Decoder is ready to use via Decompress or DecompressTo.
It is not safe to use a Decoder from multiple goroutines simultaneously.
func (*Decoder) Decompress ¶
Decompress returns the decompressed result of src as a new slice.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func (*Encoder) CompressComposite ¶
func (e *Encoder) CompressComposite(dst []byte, reqs []EncodingRequest) ([]byte, error)
type EncodingMode ¶
type EncodingMode byte
EncodingMode specifies what structural compression should be applied to the compressor's input.
const ( EncodingRaw EncodingMode = iota // No structural compression is applied EncodingIguana = 1 << 0 // Iguana structural compression is applied )
type EncodingRequest ¶
type EncodingRequest struct { Src []byte EncMode EncodingMode EntMode EntropyMode EntropyRejectionThreshold float32 EnableSecondaryResolver bool }
type EntropyMode ¶
type EntropyMode byte
EntropyMode specifies what entropy compression should be applied to the results of the selected structural compressor.
const ( EntropyNone EntropyMode = iota // No entropy compression is applied EntropyANS32 // Vectorized, 32-way interleaved 8-bit rANS entropy compression should be applied EntropyANS1 // Scalar, one-way 8-bit rANS entropy compression should be applied EntropyANSNibble // Scalar, one-way 4-bit rANS entropy compression should be applied )