Unformatted text preview: the idea of a character set, in which each character is represented by a fixed-length bit string (such as 8 or 16). The idea behind this approach is that if we use only a few bits to repre-sent characters that appear often and reserve longer bit strings for charac-ters that don’t appear often, the overall size of the document being represented is small. For example, suppose we use the following Huffman encoding to repre-sent a few characters: Then the word DOORBELL would be encoded in binary as: 1011110110111101001100100 If we used a fixed-size bit string to represent each character (say, 8 bits), then the binary form of the original string would be 8 characters times 8 bits or 64 bits. The Huffman encoding for that string is 25 bits long, giving a compression ratio of 25/64, or approximately 0.39. Huffman Code Character 00 01 100 110 111 1010 1011 A E L O R B D...
View Full Document
- Fall '10
- Character encoding, ASCII, David A. Huffman, Dr. David Huffman