Introduction - If you have any usage issues, please Google them yourself
1) I: Initialization. Read the message from the terminal, write to the tobetrans file, collect the character set of the message and the corresponding weight set, establish the haffman tree, and save the haffman tree in the file hfmtree.
(2) C: Coding. Use the built Huffman tree (read from file hfmtree, if not memory), code the body of the file tobetrans, 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. Also write the encoded file of this character in the file codeprint.
(5) T: Tree printing. The haffman tree in memory is displayed in an intuitive manner (tree or concave entry form) on the terminal, and the Huffman tree in the form of this character is written to the file treeprint.
The user interface requires a "menu" mode.
Modify your system to realize the encoding and decoding of the source program of your system (mainly by encoding/decoding problems). The source/target file that implements each transformation operation is specified by the user when selecting this operation.
Packet : 101259387taosheng.rar filelist
新建 Microsoft Word 文档.doc