Skip to main content

Module order0

Module order0 

Source
Expand description

Order-0 Context Model — predicts next bit from partial byte context.

Context = the partial byte being decoded. c starts at 1, and after each bit, c = (c << 1) | bit. After 8 bits, c holds the full byte value + 256 and gets reset to 1 for the next byte.

Each context (c in range 1..=255) maps to a state in the StateTable, which is then mapped to a probability via StateMap.

Structs§

Order0Model
Order-0 bit prediction model.