Classes for arithmetic coding and decoding.