Arithmetic coding is in this textbook... Cambridge University Press 640 pages, $50 Also available free online www.inference.phy.cam.ac.uk/mackay/