Introduction - If you have any usage issues, please Google them yourself
The haffman code of c ++ implementation, and flowchart (1) I: Initialization. From the specified English file, sourcefile.txt reads the data, and the Huffman tree is established according to the frequency of the characters in the file.
(2) E: Encoding. Use the built haffman tree to code and save each character's code in huffcode.txt.
(3) C: Compress (Compress). Encode the file sourcefile.txt in huffcode.txt and write the re-encoded content into the file codefile.txt.
(4) D: Decoding. The code in the file codefile.txt is encoded using the built Huffman tree. The result is stored in the file TextFile.
(5) P: Print code file (Print). The content of the file codefile.txt is displayed on the terminal, 50 code per line.
(6) T: it shows the Treeprinting. The haffman tree that is already in memory is displayed in an intuitive manner (tree or concave entry form) on the terminal.