arithmetic encoder