文件名称:huffman
-
所属分类:
- 标签属性:
- 上传时间:2013-10-21
-
文件大小:4.92kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
Huffman编码的关键点是构造一棵Huffman树。其过程是:
1.输入各个叶子节点及其频率,对每个节点的lchild, rchild, parent分别赋初值为0;
2.选择parent为0,且fre最小的两个节点开始建Huffman树,再修改相应节点的lchild, rchild, parent值,如此重复直到Huffman树建立。
3.从叶子到根逆向求每个节点的Huffman编码。
4.解压时,由于Huffman编码是前缀编码,即任一字符的编码都不是另一个字符的编码的前缀,故根据码表我们可以轻松实现解压。-Huffman coding key point is to construct a Huffman tree. The process is:
1 Enter each leaf node and frequency, for each node lchild, rchild, parent were given the initial value is 0
2 Select the parent is 0, and the smallest two nodes fre began to build the Huffman tree, and then modify the corresponding node lchild, rchild, parent values , so repeat until the Huffman tree created.
3 reverse request from the leaf to the root of the Huffman code for each node.
4 decompression, because Huffman coding is a prefix code, that any one character encoding to another character encoding is not the prefix, so according to code table we can easily extract.
1.输入各个叶子节点及其频率,对每个节点的lchild, rchild, parent分别赋初值为0;
2.选择parent为0,且fre最小的两个节点开始建Huffman树,再修改相应节点的lchild, rchild, parent值,如此重复直到Huffman树建立。
3.从叶子到根逆向求每个节点的Huffman编码。
4.解压时,由于Huffman编码是前缀编码,即任一字符的编码都不是另一个字符的编码的前缀,故根据码表我们可以轻松实现解压。-Huffman coding key point is to construct a Huffman tree. The process is:
1 Enter each leaf node and frequency, for each node lchild, rchild, parent were given the initial value is 0
2 Select the parent is 0, and the smallest two nodes fre began to build the Huffman tree, and then modify the corresponding node lchild, rchild, parent values , so repeat until the Huffman tree created.
3 reverse request from the leaf to the root of the Huffman code for each node.
4 decompression, because Huffman coding is a prefix code, that any one character encoding to another character encoding is not the prefix, so according to code table we can easily extract.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
huffman.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.