The method gets a data structure for storing static Huffman coding by preordering traverse Huffman binary tree and recording the course of traverse.
该方法通过先序遍历哈夫曼树,记录遍历过程,得到存储哈夫曼码表的一种数据结构。
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 .
而且每棵哈夫曼树都必须有以下结构:编码,信息,频度,双亲,左孩子,右孩子。
Summary of design: the procedures used by the data structure is linear tree and table, the algorithm used by the main sculpture, in order Huffman algorithm.
概要设计:本程序所使用的数据结构是树和线性表,所使用的算法主要有堆排序、赫夫曼算法。
应用推荐