Arithmetic coding is an entropy encoding technique that maps a sequence of symbols to a number between 0 and 1. Each possible sequence is assigned a unique interval within this range. As symbols are processed, the interval boundaries are updated based on the symbol probabilities. This allows arithmetic coding to efficiently encode sequences without needing to pre-determine codes for all possible sequences. It can achieve compression close to the entropy limit for long sequences, and easily supports adaptive and context modeling to handle non-IID sources. The interval updates ensure a unique number can be sent to decode the full sequence.