This article first appeared in the February, 1991 issue of Dr.
Dobb’s Journal  Update:I have a substantially improved article
that covers Arithmetic Coding only which you can find here: Data
Compression With Arithmetic Coding. I strongly encourage you to
read this article first for an improved take on the topic.
Note:This article was originally published in two parts. Both
parts have been combined here into one post – please note that
when you reach the footnotes and attachments for the first part,
you are only halfway through the article. Part 2 starts here.
Most of the data compression methods in common use today fall
into one of two camps: dictionary based schemes and statistical
methods. In the world of small systems, dictionary based data
compression techniques seem to be more popular at this time.
However, by combining arithmetic coding with powerful modeling
techniques, statistical methods for data compression can
actually achieve better performance. This two-part article
discusses how to combine ari