Skip to main content

Module ppm_model

Module ppm_model 

Source
Expand description

PPM (Prediction by Partial Matching) byte-level predictor — PPMd variant.

A fundamentally DIFFERENT prediction paradigm from CM:

  • CM: hash-based, lossy collisions, bit-level, fixed context orders
  • PPM: byte-level, adaptive order with escape/exclusion, checksum-validated

Full-range PPM with orders 0-12. Lower orders (0-3) provide a good fallback on small files. Higher orders (10-12) go BEYOND what any CM model covers, providing unique prediction signal on large files. All orders use checksum validation to avoid hash collisions.

The PPMd Method D escape estimation (Shkarin formula) and full exclusion mechanism provide a different error profile from CM’s bit-level hash models.

CRITICAL: PPM updates at BYTE level, not bit level. Only update after all 8 bits decoded. Byte probabilities are cached and converted to bit predictions on each bit.

Structs§

PpmConfig
PPM table sizes configuration.
PpmModel
PPM model with checksum-validated hash tables at orders 0-12.