Encoding Differences from a Prediction
A predictive format can transmit residuals against a shared model. Compression can improve if those residuals have a distribution cheaply encoded by the chosen code.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace a simple predictor
If the preceding value is the prediction, observations 10, 12, and 13 give residuals two and one after the initial sample. See delta coding.
Keep the model synchronized
The decoder should predict from values it can itself reconstruct. A disagreement in initial state can affect later samples. Program state traces can expose the first divergence.[1][2]
Trace an identical prediction at writer and reader
Suppose predictor uses the last sample for the next. Sequence ten, thirteen, twelve stores initial ten and residuals three and minus one. The decoder computes the same preceding value and adds the signed residual to recover the next sample. See delta coding.
Prediction at second value 10, residual 3 → 13
Prediction at third value 13, residual −1 → 12
Decoder updates predictor after each recovered value
Evaluate residual range and decoder agreement
A useful predictor may concentrate residuals around zero. It still needs a representation for larger errors and a shared reset rule. Test negative residuals and abrupt transitions.