Initial implementation of the Arithmetic encoder/decoder.