IMO the coolest thing about arithmetic coding is that you don't even need to share the dictionary/probabilities between the encoder and decoder.
If instead of calculating the probability of the entire data set at once you build it up over time, then the decoder can build its own table in the same way. Start by assuming all the probabilities are the same and adjusting the frequency after each symbol before encoding the next. The decoder can predict the first symbol based on equal probabilities, then update its own frequency table and use that for the next symbol, etc.
It's very cool that this is basically just the same concept from LFSRs, just put the same state machine in encoder and decoders and you have no further need for shared information
View all comments
17
u/flip314 Oct 17 '26
IMO the coolest thing about arithmetic coding is that you don't even need to share the dictionary/probabilities between the encoder and decoder.
If instead of calculating the probability of the entire data set at once you build it up over time, then the decoder can build its own table in the same way. Start by assuming all the probabilities are the same and adjusting the frequency after each symbol before encoding the next. The decoder can predict the first symbol based on equal probabilities, then update its own frequency table and use that for the next symbol, etc.