Data Compression


Survey Formats


Basic Terms

Variable Length Codes


Prefix Codes

Distribution of Code Lengths

Code Trees

Compression Methods

Data Formats




Variable Length Codes

Common codes use a constant code length for any symbol. Therefore the coding procedure is easy to implement, an adaption to symbols frequently occurring do not take place. I.e. symbols with a high frequency will get the same code length than rare ones.

Using a variable code length would provide a higher code efficiency, as far as the original data are suitable. Therefore procedures has to be implemented assigning short codes to symbols occurring frequently and long codes to rare ones. In total this will result in savings occasionally on a large scale. Detailed statements about code lengths required and statistical fundamentals will be made by information theory.

Some important requirements have to be matched using variable length codes in practice. Otherwise a faultless encoding and decoding process cannot be guaranteed.

Requirements for variable length codes:

  • unambiguous interpretation
  • flexible distribution of code lengths
  • low coding effort

Examples for variable length codes:

  • Huffman coding
  • Shannon-Fano coding

Somtimes "Variable Length Coding" is referred to as "Variable Length Encoding". The abbreviations VLC and VLE are in use.

 <   ^   > 

Information Theory []

Information []

Entropy []

Huffman Coding (survey) []

Huffman Coding (detailled) []

Shannon-Fano Coding []

Basics Entropy Coding Interpretation