Universal Code (data Compression) - Universal and Non-universal Codes

Universal and Non-universal Codes

These are some universal codes for integers; an asterisk (*) indicates a code that can be trivially restated in lexicographical order, while a double dagger (‡) indicates a code that is asymptotically optimal:

  • Elias gamma coding *
  • Elias delta coding * ‡
  • Elias omega coding * ‡
  • Exp-Golomb coding *, which has Elias gamma coding as a special case. (Used in H.264/MPEG-4 AVC)
  • Fibonacci coding
  • Levenstein coding * ‡, the original universal coding technique
  • Byte coding, also known as comma coding, where a special bit pattern (with at least two bits) is used to mark the end of the code — for example, if an integer is encoded as a sequence of nibbles representing digits in base 15 instead of the more natural base 16, then the highest nibble value (i.e., a sequence of four ones in binary) can be used to indicate the end of the integer.

These are non-universal ones:

  • unary coding, which is used in Elias codes
  • Rice coding, which is used in the FLAC audio codec and which has unary coding as a special case
  • Golomb coding, which has Rice coding and unary coding as special cases.

Their nonuniversality can be observed by noticing that, if any of these are used to code the Gauss–Kuzmin distribution or the Zeta distribution with parameter s=2, expected codeword length is infinite. For example, using unary coding on the Zeta distribution yields an expected length of

On the other hand, using the universal Elias gamma coding for the Gauss–Kuzmin distribution results in an expected codeword length (about 3.51 bits) near entropy (about 3.43 bits).

Read more about this topic:  Universal Code (data Compression)

Famous quotes containing the words universal and/or codes:

    I believe there’s no proverb but what is true; they are all so many sentences and maxims drawn from experience, the universal mother of sciences.
    Miguel De Cervantes (1547–1616)

    I cannot help thinking that the menace of Hell makes as many devils as the severe penal codes of inhuman humanity make villains.
    George Gordon Noel Byron (1788–1824)