Skip to main content

Module indirect_model

Module indirect_model 

Source
Expand description

IndirectModel — second-order context prediction.

Instead of “what follows this context?”, predicts “what follows the byte that USUALLY follows this context?”

Maintains two tables:

  1. prediction_table: context_hash -> most-likely-next-byte (updated byte-by-byte)
  2. ContextMap: uses (predicted_byte, c0_partial, bpos) as context for bit prediction

This captures second-order sequential patterns: “after ‘th’ comes ‘e’, and after ‘e’ in this position comes ’ ’”

Proven effective in PAQ8PX’s IndirectModel: typically -0.03 to -0.08 bpb.

Structs§

IndirectModel
Indirect context model (model #16 in the mixer).