# Functions
DecodeAlphabet reads the alphabet from the bitstream and return the number of symbols read or an error.
EncodeAlphabet writes the alphabet to the bitstream and return the number of symbols written or an error.
GetName returns the name of the entropy codec given its type.
GetType returns the type of the entropy codec given its name.
NewBinaryEntropyEncoder creates an instance of AdaptiveProbMap given the provided type of APM.
NewANSRangeDecoder creates an instance of ANS decoder.
NewANSRangeDecoderWithCtx creates a new instance of ANSRangeDecoder providing a context map.
NewANSRangeEncoder creates an instance of ANS encoder.
NewANSRangeEncoderWithCtx creates a new instance of ANSRangeEncoder providing a context map.
NewBinaryEntropyDecoder creates an instance of BinaryEntropyDecoder using the given predictor to predict the probability of the next bit to be one.
NewBinaryEntropyEncoder creates an instance of BinaryEntropyEncoder using the given predictor to predict the probability of the next bit to be one.
NewCMPredictor creates a new instance of CMPredictor.
NewEntropyDecoder creates a new entropy decoder using the provided type and bitstream.
NewEntropyEncoder creates a new entropy encoder using the provided type and bitstream.
NewExpGolombDecoder creates a new instance of ExpGolombDecoder If sgn is true, values from the bitstream will be decoded as signed (int8).
NewExpGolombEncoder creates a new instance of ExpGolombEncoder If sgn is true, values will be encoded as signed (int8) in the bitstream.
NewFPAQDecoder creates an instance of FPAQDecoder.
NewFPAQDecoderWithCtx creates an instance of FPAQDecoder providing a context map.
NewFPAQEncoder creates an instance of FPAQEncoder providing a context map.
NewFPAQEncoderWithCtx creates an instance of FPAQEncoder.
NewHuffmanDecoder creates an instance of HuffmanDecoder.
NewHuffmanDecoderWithCtx creates an instance of HuffmanDecoder providing a context map.
NewHuffmanEncoder creates an instance of HuffmanEncoder.
NewNullEntropyDecoder creates a new instance of NullEntropyDecoder.
NewNullEntropyEncoder creates a new instance of NullEntropyEncoder.
NewRangeDecoder creates a new instance of RangeDecoder The given arguments are either empty or containing a chunk size.
NewRangeEncoder creates a new instance of RangeEncoder The given arguments are either empty or containing a chunk size and a log range (to specify the precision of the encoding).
NewTPAQPredictor creates a new instance of TPAQPredictor using the provided map of options to select the sizes of internal structures.
NormalizeFrequencies scales the frequencies so that their sum equals 'scale'.
ReadVarInt reads a VarInt from the bitstream and returns it as an uint32.
WriteVarInt writes the provided value to the bitstream as a VarInt.
# Constants
Asymmetric Numerical System order 0.
Asymmetric Numerical System order 1.
Context Model.
Fast PAQ (order 0).
Huffman.
INCOMPRESSIBLE_THRESHOLD Any block with entropy*1024 greater than this threshold is considered incompressible.
No compression.
Obsolete.
Range.
Reserved.
Reserved.
Reserved.
Reserved.
Reserved.
Reserved.
Tangelo PAQ.
Tangelo PAQ Extra.
# Structs
ANSRangeDecoder Asymmetric Numeral System Decoder.
ANSRangeEncoder Asymmetric Numeral System Encoder.
BinaryEntropyDecoder entropy decoder based on arithmetic coding and using an external probability predictor.
BinaryEntropyEncoder entropy encoder based on arithmetic coding and using an external probability predictor.
ExpGolombDecoder Exponential Golomb Entropy Decoder.
ExpGolombEncoder Exponential Golomb Entropy Encoder.
FPAQDecoder entropy decoder derived from fpaq0r by Matt Mahoney & Alexander Ratushnyak.
FPAQEncoder entropy encoder derived from fpaq0r by Matt Mahoney & Alexander Ratushnyak.
HuffmanDecoder Implementation of a static Huffman decoder.
HuffmanEncoder Implementation of a static Huffman encoder.
NullEntropyDecoder pass through entropy decoder (reads the input bytes directly from the bitstream).
NullEntropyEncoder pass through entropy encoder (writes the input bytes directly to the bitstream).
RangeDecoder Order 0 Range Entropy Decoder.
RangeEncoder a Order 0 Range Entropy Encoder.
TPAQMixer a mixer that combines models using neural networks with 8 inputs.
TPAQPredictor bit predictor for binary entropy codecs.
# Type aliases
FastLogisticAdaptiveProbMap is similar to LogisticAdaptiveProbMap but works faster at the expense of some accuracy.
LinearAdaptiveProbMap maps a probability and a context into a new probability using linear interpolation of probabilities.
LogisticAdaptiveProbMap maps a probability and a context into a new probability using interpolation in the logistic domain.