Basic Version:
The Arithmetic Coder is a fairly complex compression
algorithm that allows us to compress at a relatively high ratio. It does
this by compressing several bits that are the same into one bit. It again
relies on the fact that there is a very high correlation between neighboring
pixels in an image.
We first calculate the frequency of the values in the
image. This way we can compress the values that show up the most
frequently with the highest compression ratio. We essentially can encode
several of these values as one single value. Using this method, the
values with a small frequency will get compressed poorly, but it doesn't matter
because they occur so infrequently.