Arithmetic coding functional