15-06-2012, 03:58 PM
Huffman coding
Huffman coding.pptx (Size: 138.78 KB / Downloads: 30)
Introduction
used for compressing the data
uses the table of frequencies of occurrence of characters
each character is represented by a binary string
Two ways
Fixed length code
Variable length code
The (Real) Basic Algorithm
1. Scan text to be compressed and tally occurrence of all characters.
2.Sort or prioritize characters based on number of occurrences in text.
3.Build Huffman code tree based on prioritized list.
4. Perform a traversal of tree to determine all code words.
5. Scan text again and create new file using the Huffman codes.
Summary
Huffman coding is a technique used to compress files for transmission
Uses statistical coding
more frequently used symbols have shorter code words
Works well for text and fax transmissions
An application that uses several data structures