Expand description
ContextModel – flexible context model using ContextMap + StateMap.
Phase 4+: Three CM model variants, each now producing 3 predictions:
- StateMap prediction (p1): existing state->probability mapping
- Run-count prediction (p2): consecutive same-bit count in this context
- Byte-history prediction (p3): last byte seen in this context predicts current bit
The run-count uses the same bit-level hash as the StateMap. The byte-history uses a separate byte-level hash (independent of partial byte c0) so that the stored byte is accessible at any bpos within the same byte context.
Structs§
- Associative
Context Model - A context model using 2-way set-associative ContextMap. Best for order-5+ where collision rates are highest.
- Checksum
Context Model - A context model using ChecksumContextMap for reduced collision damage.
- Context
Model - A context model backed by a ContextMap (hash->state) + StateMap (state->prob). Now also produces run-count and byte-history predictions.
Type Aliases§
- Dual
Prediction - Dual prediction from a context model. (state_p, run_p) – both 12-bit probabilities in [1, 4095].