Introduction - If you have any usage issues, please Google them yourself
Using binary tree structure to achieve Huffman encoder/decoder.
Basic requirements:
1 Initialization: the ability to input a string of arbitrary length s statistical, statistical frequency of each character, and the establishment of Huffman tree
2, the coding table: the use of the Huffman tree has been built to encode, and encoding each character output.
3, code: According to the code table to encode the input string and output the encoded string.
4, decoding: use of the Huffman tree has been built on the encoded string decoding, and outputs decoding result.
5, print: the intuitive way to print Huffman tree (chosen as)
6 to calculate the input code string length before and after coding, and analysis, discussion of Huffman coding compression.