Reference
Residual Coding Modes
Look up syntax, contracts, layouts, algorithms, and exact behavior.
AIXC separates prediction correctness from residual representation. The simplest residual is the literal unit, but a predictor distribution contains more information than a binary hit/miss flag. If the correct unit appears near the top of the ranked prediction list, the archive can store a rank or compact top-k code rather than a full literal.
The format can still fall back to literal residuals. This fallback is essential because the archive must be exact even when the predictor is wrong in an unhelpful way. The residual mode therefore defines a total decode rule, not merely an optimization hint.
predict next unit | +-- exact top prediction -> decision hit, no residual | +-- true unit in top-k -> decision miss, rank residual | +-- otherwise -> decision miss, literal residual