Arithmetic Coding (AC)

With Arithmetic Coding text strings are converted to doubles according to their letters' frequencies. The interval [0; 1) is divided into parts proportional to these frequencies.
When encoding, the partial interval belonging to the current letter is chosen and becomes the new interval which is divided in the same way as above. When reaching the end or after a certain number of letters the result is written out, being the double writable with the least number of bits within the last intervals bounds.
When decoding, the partial interval within whose bounds the result is located is chosen and the letter belonging to the partial interval is written out. The chosen interval becomes the new interval and is divided as written above. When having decoded the preset number of letters the algorithm terminates.

Applet's Usage:

Go back to Lossless Compression

Go on to my German Documentation

Written by: Oliver Schmid © May 2002