Location:
Search - MFC Fo
Search list
Description: 学习MFC字体的代码。-learning MFC font code.
Platform: |
Size: 26624 |
Author: scarpel |
Hits:
Description: 附件实现huffman数据压缩的基本实现,不具备通用性.但是却是一个成品,用MFC经过包装界面也比较可以,可以让大家参考,
再着说明下文件压缩后的格式:扩展名是".fm",文件头两个字节是字母"FM"(用来检验文件格式),然后是原始文件名的长度,再来是原始文件长度(解码的时候判断解码结素),接着是原始文件名,再来是是256个unsigned long的数据表示原始文件每个字母出现的次数(用来重新建立huffman树),最后就是数据了,也就是编码后的数据.
注意几点是,解码要是.fm的文件才可以,如果输出文件名是NULL,则自动填写文件名,如:a.txt压缩后生成a.fm.
为了遍历huffman树写了个栈,只所以这么麻烦是考虑效率以非第归形式遍历huffman树.-Annex to achieve data compression huffman basically, do not have the versatility. But it is a finished product through the packaging interface with MFC
Comparison also can make your reference,
Then the description of the file compression format: extension is ". Fm", documents the first two bytes are the letters "FM" (used to test file
Format), then the original file name length, the length of the original file again (decoding, decode statement to determine factors), followed by the original
File name, again yes yes 256 unsigned long data indicated that the original document number of occurrences of each letter (to re-establish
huffman tree), and finally the data that is encoded data.
Note that a few points, decoding if the. Fm files can, if the output file name is NULL, then automatically fill in file name,
Such as: a.txt compression generated a.fm.
In order to traverse the huffman tree wrote a stack, so only the efficiency of such problems is to consider the fo
Platform: |
Size: 79872 |
Author: 林冬冬 |
Hits: