Data Compression Using Asymmetric Numeral Systems

Requires a Wolfram Notebook System
Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.
This Demonstration allows you to experiment with compression using a new method: asymmetric numeral systems.
[more]
Contributed by: Jarek Duda (March 2011)
Open content licensed under CC BY-NC-SA
Snapshots
Details
Numeral systems are optimal for encoding sequences of symbols (digits) that have uniform distribution.
An asymmetric numeral system is a generalization constructed to be optimal for any given probability distribution of symbols (digits).
With some information stored in a natural number , to add some information stored in a digit
that all has the same probability (
), take
to place this information in the right-most bits.
In the asymmetric case should hold asymptotically.
This cannot usually be done exactly, but for asymptotic behavior the symbols only need to be distributed uniformly. A random number generator can be used to choose a specific distribution. If this generator is initialized with a given key, this additionally encrypts the output.
To encode in this way, would grow to infinity. To prevent that,
is restricted to some range
and some bits are removed in blocks of "width" bits to a bit stream (compressed file).
Basic information about this coding can be found in:
http://arxiv.org/pdf/0710.3861
More information about using it in cryptography:
Permanent Citation