Welcome![Sign In][Sign Up]
Location:
Search - haffman.rar

Search list

[Compress-Decompress algrithmscompress_folders

Description: 哈夫曼压缩程序,实现了文件加读取,对文本文件的压缩率与rar差不多,读学习c/c++的朋友非常有用-huffman compression program, which realizes folder access and compressing rate is the same to rar when compressing text file
Platform: | Size: 2037760 | Author: | Hits:

[Compress-Decompress algrithmshaffman

Description: 在Jpeg中Huffman采用的是范式Huffman编码。经过查相关资料有两种不同说法,请高手指点。谢谢! 1、构造范式 Huffman 编码的方法大致是: 分别统计从最大编码长度 maxlength 到 1 的每个长度对应了多少个符号。根据这一信息从 maxlength 个 0 开始以递增顺序为每个符号分配编码。例如,编码长度为 5 的符号有 4 个,长度为 3 的有 1 个,长度为 2 的有 3 个,则分配的编码依次为: 00000 00001 00010 00011 001 01 10 11 问题:如果按照这种说法那么我在一付图像中渡到的数据是:编码长度为 6 的符号有 1 个,长度为 5 的有 1 个,长度为 4 的有 3 个,长度为3的个数为4个,长度为2的个数为1个。按照以上的算法得到的编码为:000000;00001;0010;0011;001;010;011;100;01。出现001是0011的前缀。在读取数据流的时候将不能区别。 2、另外一种说法,曾经发帖问过。前面的长度编码加1左移一位得到后面长度的编码。像我这个例子如何确定最短码的起始值? 谢谢大家指点具体的范式Huffman编码实现-in which Huffman is the paradigm Huffman coding. After investigations related information in two different arguments, please master guiding. Thank you! 1, tectonic paradigm Huffman coding method is generally : statistics separately from the largest maxlength length coding to a length corresponding to each of the number of symbols. According to the information from maxlength-0 progressive order of the distribution of each symbol coding. For example, the length coding for the five symbols have four, three lengths of a length of two to three. the allocation of coding followed : 00000 00001 00010 00011 001 01 10 11 questions : According to this view, if I pay in a transition to the image data is : coding length of the six are a symbol, 5 lengths of a length of 4 to 3, the length of three to fo
Platform: | Size: 8192 | Author: gaorui | Hits:

[Compress-Decompress algrithmscallzipdll_callzlib_HUFUNHUF

Description: 字符串和文件压缩和解压缩的例子,既有成熟的第三方标准dll的调用例子(callzlib调用动态库压缩解压缩字符串,callzlib调用静态库压缩解压缩字符串.rar),也有zipdll这个 c++ dll的调用例子,还有16/32位Haffman编码压缩与解压缩的程序(huf,单文件压缩程序huftest,单文件解压缩程序huftest)。 huf目录的两个源程序:HUF.C和UNHUF.C能用16位编译器编译通过,不能在VC中直接编译通过 现在我已经将HUF/UNHUF的代码用vc重新编译成32位标准DLL,运行结果与16位EXE运行的一致,方便验证压缩与解压缩的有关理论 关于Haffman编码压缩与解压缩的程序,我测试过一些文件,得出的初步结论是:可以压缩解压文本文件、位图及JPEG图象(负压缩),不能压缩解压.ico文件,具体原因还不清楚。-callzipdll_callzlib_HUFUNHUF
Platform: | Size: 1289216 | Author: hanxiaohua | Hits:

CodeBus www.codebus.net