Arithmetic Coding
Huffman coding works well for larger alphabets and gets to within one bit of the entropy lower bound. Can we do better. Yes
Basic idea in arithmetic coding:
- represent each string x of length n by an interval A in [0,1).
- The width of the interval A represents the probability of x occurring.
- The interval A can itself be represented by any number, called a tag, within the half open interval.
- The significant bits of the tag is the code of x.