Huffman tree
Huffman tree structure to achieve the Huffman algorithm.
实现构造哈夫曼树的哈夫曼算法。
—— 给力词典精选The algorithm uses a fixed set of complementary parity codes to replace the encoding table that dynamically generated by the traditional Huffman method.
该算法使用固定奇偶码,省去了传统算法动态生成哈夫曼树的繁琐过程;
—— 给力词典精选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 .
而且每棵哈夫曼树都必须有以下结构:编码,信息,频度,双亲,左孩子,右孩子。
—— 给力词典精选The method gets a data structure for storing static Huffman coding by preordering traverse Huffman binary tree and recording the course of traverse.
该方法通过先序遍历哈夫曼树,记录遍历过程,得到存储哈夫曼码表的一种数据结构。
—— 给力词典精选According to our well-established Huffman coding, starting from the root node in the left subtree is marked as 0, the right is labeled 1.
根据建立好的哈夫曼树我们进行编码,从根结点出发在左子树则标为0,右则标为1。
—— 给力词典精选