How does arithmetic coding work?
My book, “The Data Compression Book, 2nd ed.” has source code and a detailed explanation of arithmetic coding. To get more info on the book (including a link to order the book from Amazon.com) go to my home page and follow the links to “The Data Compression Book”: http://www.dogma.net/markn The source code included in the book is fairly portable, you ought to be able to adapt it to your purposes without too much trouble. The book should be available in well stocked technical bookstores, if not you can follow a directed pointer to amazon.com from my web page. My page also has pointers to other resources, where you might find additional information you need. In particular, one good source of free information is the comp.compression FAQ, available all over the net. You can find links to it on my FAQ, accessible from my home page.