Data Compression
Introduction :: Kraft :: Optimal Codes :: Bounds :: Huffman :: Coding
Introduction
We will apply what we know of entropy to the problem of data compression. We will introduce and prove the important Kraft inequality, Shannon codes, and Huffman codes.
We are now ready to use the tools we have been building over the last few weeks to work on the problem of efficient representation of data: data compression. In order the made usable coding representations, we introduce a type of codes known as instantaneous codes, which can be decoded without any backtracking. We present the Kraft inequality, which is an important result on the lengths of codewords. Then we show how to achieve a lower bound and introduce Huffman coding.
Some Simple Codes
The last example is a code that is a singular code.
We have met the idea of stringing together a bunch of codes in
succession. This has a definition:
That is, if we string together a bunch of codewords, we want to be
able to tell where one codeword leaves off and another begins. The
first example code presented is not uniquely decodable.
There may be codes which are uniquely decodable, but in order to do the
decoding, the decoder may have to do some look-ahead and some
backtracking in order to come up with a unique sequence. In practice,
this means the decoding hardware is more complicated, and these kinds
of codes are avoided where possible.
An instantaneous codeword can be decoded without look-ahead, since the
end of a codeword is immediately recognizable (it is not the beginning
of any other codeword). Instantaneous codes are ``self-punctuating.''







