摘要
传统的哈夫曼编码需要构建哈夫曼树方可生成,同时要保留原始的哈夫曼树供译码时参照恢复原信息。由于哈夫曼编码码长不一,对照哈夫曼树译码的方法麻烦费时;而且每棵哈夫曼树都必须有以下结构:编码,信息,频度,双亲,左孩子,右孩子。而解码时只需用到编码、信息域就可以了,因此造成不必要的空间浪费。鉴于这种情况,本文提出了一种不依赖树结构进行高速编码/译码的规范哈夫曼码压缩算法,实验证明,该算法的整个压缩、解压缩过程比传统的哈夫曼压缩算法快得多,所需空间少得多,是一种行之有效的快速压缩算法。
The Huffman tree must be built in traditional Huffman coding and the tree must be saved for decoding . Owing to the difference in the length of Huffman codes decoding is inconvenient and time-consuming against the Huffman tree. Secondly every Huffman tree must have following structure code,data,weight,parent,l-child and r-child but only code and data are needed in decoding . It causes inessential space waste. In view of the above-mentioned facts a canonical Huffman compress algorithm that is not dependent on tree structure is put forward in this paper. Experi- ments prove that the process of coding and decoding is faster and the space needed in coding and decoding is fewer with this algorithm than traditional Huffman algorithm. It is a effective fast Huffman compress algorithm.
出处
《现代计算机》
2005年第2期95-97,共3页
Modern Computer