Description: Huffman code translator:
Using Huffman code for communication can greatly improve channel utilization, shorten information transmission time, and reduce transmission cost. However, this requires a coding system to preencode the data in the sending end and decoding the incoming data at the receiving end (recovery). For duplex channels (i.e. channels that can transmit information both ways), each end requires a complete code/decoding system. Try to write a Huffman code/decoding system for such a message transceiver.
[basic requirements] a complete system should have the following functions:
(1) I: Initialization. Read the character set size n from the terminal, and n characters and n weights, build the haffman tree, and store it in the file hfmTree.
(2) E: Encoding. Use the built Huffman tree (read from file hfmTree, if not memory), code the body of the file ToBeTran, and then deposit the results in the file CodeFile.
(3) D: Decoding. Using the built Huffman tree to decode the code in CodeFile, the result is stored in the file TextFile.
(4) P: Print. The file CodeFile is displayed in a compact format on the terminal, 50 code per line. Write the encoding file of this character in the file CodePrin at the same time.
(5) T: Tree printing. The haffman tree in memory is displayed in an intuitive manner (tree or concave entry form), and a Huffman tree in the form of this character is written to the file TreePrint.
- [Huffmandecoding.Rar] - [basic requirements] a complete system s
- [AHuffman] - Using java to achieve adaptive Huffman a
- [datastructure] - The establishment of the chain store bin
- [pj2] - Huffman tree based on the decompression
- [HuffanCoding] - Huffman encoding and decoding of this pr
- [Huffmancodeandreport] - The haffman code of c ++ implementation,
- [hafuman] - err
- [PhysXBoxes] - Ageia s PhysX (well-known game physics l
- [hafuman] - The use of Huffman coding can greatly im
- [5] - 1.C, or C++ 2. Read from the terminal in
File list (Check if you may need any files):