文件名称:yuesefuhuan
介绍说明--下载内容均来自于网络,请自行研究使用
实现以下功能:
⑴I:初始化(Initialization)。从终端读入字符集大小n,以及n个字符和n个权值,建立哈夫曼树,并将它存于文件hfmTree中;
⑵E:编码(Encoding)。利用已建好的哈夫曼树(如不在内存,则从文件hfmTree中读入),对文件ToBeTran中的正文进行编码,然后将结果存入文件Codefile中 ;
⑶D:译码(Decoding)。利用已建好的哈夫曼树将文件CodeFile中的代码进行译码,结果存入文件TextFile中;
⑷P:打印代码文件(Print)。将文件CodeFile以紧凑格式显示在终端上,每行50个代码。同时将此字符形式的编码文件写入文件CodePrin中;
⑸T:打印哈夫曼树(Tree Printing)。将已在内存中的哈夫曼树以直观的方式(树或凹入表形式)显示在终端上,同时将此字符形式的哈夫曼树写入文件TreePrint中。-The following functions: ⑴ I: initialization (Initialization). Read from the terminal character set size n, and n characters and n weights to build the Huffman tree, and save it in the file hfmTree in ⑵ E: encoding (Encoding). Been built using Huffman tree (eg not in memory, reads from the file hfmTree), the text of the document ToBeTran encoded, and then the result is stored in the file Codefile ⑶ D: decoding (Decoding). Use Huffman tree has been built CodeFile code file decoding, the result is stored in the file TextFile ⑷ P: Print code files (Print). The file CodeFile displayed on the terminal in a compact format, each row 50 code. At the same time this is written in the form of encoded characters in file CodePrin ⑸ T: Print Huffman tree (Tree Printing). Would have been in memory Huffman tree in an intuitive way (tree or recessed table form) is displayed on the terminal, but this character in the form of written documents TreePrint in the Huffman tree.
⑴I:初始化(Initialization)。从终端读入字符集大小n,以及n个字符和n个权值,建立哈夫曼树,并将它存于文件hfmTree中;
⑵E:编码(Encoding)。利用已建好的哈夫曼树(如不在内存,则从文件hfmTree中读入),对文件ToBeTran中的正文进行编码,然后将结果存入文件Codefile中 ;
⑶D:译码(Decoding)。利用已建好的哈夫曼树将文件CodeFile中的代码进行译码,结果存入文件TextFile中;
⑷P:打印代码文件(Print)。将文件CodeFile以紧凑格式显示在终端上,每行50个代码。同时将此字符形式的编码文件写入文件CodePrin中;
⑸T:打印哈夫曼树(Tree Printing)。将已在内存中的哈夫曼树以直观的方式(树或凹入表形式)显示在终端上,同时将此字符形式的哈夫曼树写入文件TreePrint中。-The following functions: ⑴ I: initialization (Initialization). Read from the terminal character set size n, and n characters and n weights to build the Huffman tree, and save it in the file hfmTree in ⑵ E: encoding (Encoding). Been built using Huffman tree (eg not in memory, reads from the file hfmTree), the text of the document ToBeTran encoded, and then the result is stored in the file Codefile ⑶ D: decoding (Decoding). Use Huffman tree has been built CodeFile code file decoding, the result is stored in the file TextFile ⑷ P: Print code files (Print). The file CodeFile displayed on the terminal in a compact format, each row 50 code. At the same time this is written in the form of encoded characters in file CodePrin ⑸ T: Print Huffman tree (Tree Printing). Would have been in memory Huffman tree in an intuitive way (tree or recessed table form) is displayed on the terminal, but this character in the form of written documents TreePrint in the Huffman tree.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
yuesefuhuan\p8.cpp
...........\实验八 哈夫曼编_译码器.ppt
...........\实验八补充说明.ppt
yuesefuhuan