Also-RANS: Asymmetric Numeral Systems for entropy coding
Summary
The article explains rANS, a family of entropy coding methods, and how it achieves near-optimal compression by encoding a symbol sequence into a single integer via reversible arithmetic operations. It provides a concrete encoding example, discusses decoding, renormalization to keep the state bounded, and a complete encode/decode pseudocode with a fixed state range and symbol frequency table. The piece also highlights implementation details and the LIFO nature of rANS.