Diagram of arithmetic encoding decoding. There are 4 symbols, with probabilities 0.6, 0.2, 0.1, and 0.1. The circular point represents the encoded message and decodes to the first symbol, followed by the third, followed by the fourth (which in this case serves as a termination character). The first line shows the complete interval, and then we successively zoom in on subranges which are subdivided in the same proportions. It's based on text in en:Arithmetic encoding.
Own work
Dcoetzee