文件名称:Huffman
介绍说明--下载内容均来自于网络,请自行研究使用
1.基本上已经完成压缩及解压缩操作的代码实现。
解压缩时关键还是文件流的操作,读取内容时采用逐字节读取,把0-255的十进制整数转化为二进制数,利用这些二进制数从哈夫曼树的根结点出发,0走左子,1走右子,找到叶子结点,把该叶子结点的下标写入新文件,最后处理有效位数不满8位的字节-1 basically completed the compression and decompression code implementation.
Decompression is the key stream file operation, read the byte by byte read and the 0- 255 decimal integer transformation as a binary number, using the binary number starting the root node of the Huffman tree, 0 go left, 1 walk right, find a leaf node, the subscr ipt of the leaf node is written to a new file, the effective number of bits 8 bits of the byte discontent
解压缩时关键还是文件流的操作,读取内容时采用逐字节读取,把0-255的十进制整数转化为二进制数,利用这些二进制数从哈夫曼树的根结点出发,0走左子,1走右子,找到叶子结点,把该叶子结点的下标写入新文件,最后处理有效位数不满8位的字节-1 basically completed the compression and decompression code implementation.
Decompression is the key stream file operation, read the byte by byte read and the 0- 255 decimal integer transformation as a binary number, using the binary number starting the root node of the Huffman tree, 0 go left, 1 walk right, find a leaf node, the subscr ipt of the leaf node is written to a new file, the effective number of bits 8 bits of the byte discontent
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Huffman.cpp