Introduction - If you have any usage issues, please Google them yourself
Huffman encoder/decoder
The use of Huffman coding channel communication can greatly improve the channel utilization, time-to-information transmission, and reduce transmission costs. However, this requires the sending end through a coding system pre-treatment data encoding, decoding at the receiving end of the data (recovery). For duplex channel (ie two-way transmission channel), each side needs a complete encoder/decoder system. Write a Huffman encoder/decoder system test for such information transceiver station.
Requirements: a complete system should have the following features:
(1) initialization (Initialization). Read from the terminal character set size n, and n characters and weights,
Create a Huffman tree, and save it in a file hfmTree.
(2) encoding (encoding). Huffman tree has been built (if not in memory, read from the file hfmTree
Into) the file ToBeTrans the text encoding, and the result is stored in the file CodeFile.
(3) decoding