Huffman compression class in C++

时间:2011-11-17 16:56:51
【文件属性】:

文件名称:Huffman compression class in C++

文件大小:12KB

文件格式:RAR

更新时间:2011-11-17 16:56:51

Huffman compression class in C++

国外源码,内有Huffman实现cpp和h文件,还不错, 源注释: I've written, some many years ago, a dynamic Huffman algorithm to compress and decompress data. It is mainly targeted to data with some symbols occurring more often than the rest (e.g., having some data file consisting of three different symbols, and their total number of occurrences in that file is s1(1000), s2(200), s3(30), so the total length of the file is 1000+200+30=1230 bytes; it is encoded, assigning one bit to s1 and two bits to s2, s3, so the encoded length is 1*1000+2*(200+30)=1460 bits=182 bytes). In the best case, a file consisting of just one symbol will be encoded with a compression ratio of 1:8. Huffman coding is used in image compression; however, in JPEG2000, an arithmetic codec is employed.


【文件预览】:
huffman_src.zip
huffman_demo.zip

网友评论

  • 可以使用,谢谢
  • 还可以,, 用C++编 Huffman,,进行建树过程