Tunstall codes

Most of the variable length codes that we look encode letters from the source alphabet using codewords with varying numbers of bits: codewords with fewer bits for letters that occur more frequently and codewords with more bits for letters that occur less frequently.

The tunstall code is an important exception.

In the Tunstall code, all codewords are of equal length.

However, each codeword represents a different number of letters.

The main advantage of a Tunstall codes is that errors in codewords do not propagate , unlike other variable length codes, such as Huffman codes, in which an error in one codeword will cause a series of errors to occur.
SequenceCodewords
AAA00
AAB01
AB10
B11

Comments