Expand description
Binary Arithmetic Coder — PAQ8-style, 12-bit precision, carry-free.
Encodes/decodes one bit at a time given a 12-bit probability of bit=1. Uses 32-bit range [low, high] with byte-wise normalization.
Probabilities must be in [1, 4095]. 0 and 4096 are forbidden.
Structs§
- Arithmetic
Decoder - Binary arithmetic decoder. Reads bits from compressed data.
- Arithmetic
Encoder - Binary arithmetic encoder. Accumulates compressed bytes.