4 ms·
Arithmetic encoding https://en.wikipedia.org/wiki/Arithmetic_encoding https://en.wikipedia.org/wiki/Arithmetic_encoding . The way I would put it is: the statist
by gwern 8y ago
Arithmetic encoding https://en.wikipedia.org/wiki/Arithmetic_encoding https://en.wikipedia.org/wiki/Arithmetic_encoding . The way I would put it is: the statistical model does its best to predict the next bits, assigning short bit strings to what it thinks is likely to come next and long bit strings to less likely next bits, and if it is indeed right, only the short bitstrings need to be emitted; if it's wrong, more long bit strings must be spent to correct it and emit the exact right bitstring. (Like using shorthand with lots of convenient shortcuts, and then falling back to painfully writing everything out explicitly.) So, you can use imperfect lossy probabilistic models, while still getting lossless compression.