Based on the previous post, I can't stop until I implement my own arithmetic coding. The worse is I don't have my laptop with me, therefore I only have read articles and tried encoding/decoding on the paper. Which is slightly harder if numbers used are fixed point and want to imitate how C program should work. These 3 pages helped me most to understand the problem.
Arithmetic Code [michael.dipperstein.com]
Basic arithmetic coding [arturocampos.com]
Arithmetic coding how to [pdf] [webspace.ulbsibiu.ro/macarie.breazu]