Introduction - If you have any usage issues, please Google them yourself
The principle use of Huffman coding for lossless compression of the data code to design an implementation of Huffman compression encoding and decoding process. Specific requirements are as follows: read the text file to be compressed 2) Statistical Analysis text file frequency of appearance of each character in frequency as the Huffman tree structure weights. According to the difference of the frequency of characters appear Huffman tree structure, and Huffman coding required for each character. Reads again the text file to be compressed, and then Huffman coding each character one by one alternative, the resulting encoded stream is written to the new file, and the calculated compression ratio. 5) decoding process: first step to get a read on the new file it as a bit stream, according to the Huffman tree for the bit-by-bit stream decoding, the decoded result has written to a new file.