哈夫曼译码

所属分类:C#编程
开发工具:C++ Builder
文件大小:990KB
下载次数:148
上传日期:2006-01-04 12:25:44
上 传 者x03630101
说明:  [基本要求] 一个完整的系统应具有以下功能: (1)I:初始化(Initialization)。从终端读入字符集大小n,以及n个字符和n个权值,建立哈夫曼树,并将它存于文件hfmTree中。 (2)E:编码(Encoding)。利用已建好的哈夫曼树(如不在内存,则从文件hfmTree中读入),对文件ToBeTran中的正文进行编码,然后将结果存入文件CodeFile中。 (3)D:译码(Decoding)。利用已建好的哈夫曼树将文件CodeFile中的代码进行译码,结果存入文件TextFile中。 (4)P:印代码文件(Print)。将文件CodeFile以紧凑格式显示在终端上,每行50个代码。同时将此字符形式的编码文件写入文件CodePrin中。 (5)T:印哈夫曼树(Tree printing)。将已在内存中的哈夫曼树以直观的方式(树或凹入表形式)显示在终端上,同时将此字符形式的哈夫曼树写入文件TreePrint中。 [测试数据] (1)利用下面这道题中的数据调试程序。 某系统在通信联络中只可能出现八种字符,其概率分别为0.25,0.29,0.07,0.08,0.14,0.23,0.03,0.11,试设计哈夫曼编码。 (2)用下表给出的字符集和频度的实际统计数据建立哈夫曼树,并实现以下报文的编码和译码:“THIS PROGRAM IS MY FAVORITE”。
([basic requirements] a complete system should have the following functions : (a) I : initialization (Initialization). Reading from the terminal into the HKSCS size n, and n n characters and the right value, the establishment of Huffman tree. it will be stored in documents hfmTree China. (2) E : coding (Encoding). Use has completed the Huffman tree (if not memory, from hfmTree document reads), the document ToBeTran the encoded text, and then the results were CodeFile posting documents. (3) D : Decoding (Decoding). The use of the completed document will Huffman tree CodeFile the code decoding, results were deposited documents TextFile. (4) P : India source document (Print). CodeFile of documents to compact format in the end, every line 50 code. While this form of characters encoded files int)

文件列表:
哈夫曼译码\哈夫曼编码.cpp (6335, 2005-10-28)
哈夫曼译码\hfmTree.txt (77, 2005-10-16)
哈夫曼译码\ToBeTran.txt (27, 2005-10-16)
哈夫曼译码\哈夫曼_译码器.doc (138752, 2005-11-10)
哈夫曼译码\哈夫曼编码.dsp (3451, 2006-01-03)
哈夫曼译码\Debug (0, 2006-01-03)
哈夫曼译码\哈夫曼编码.plg (756, 2006-01-03)
哈夫曼译码\CodePrin.txt (118, 2006-01-03)
哈夫曼译码\TextFile.txt (27, 2006-01-03)
哈夫曼译码 (0, 2006-01-03)

近期下载者

相关文件


收藏者