摘要
串表压缩(Lempel Ziv Welch,LZW)算法在词条存储过程中会重复存储已存储内容,在编码过程中造成内存浪费,而Huffman算法会占用CPU大量时间,为了克服这2种算法的缺点,提出了一种LZW-Huffman混合算法,在该算法的LZW编码阶段,采用二叉树结构存储词条,且对词条出现次数进行统计,再根据LZW压缩结果进行Huffman编码.经过测试分析,该混合算法能够节省LZW编码过程中的内存资源,压缩效果优于原始算法.
The LZW algorithm stores the stored contents repeatedly in the entry storage process, which wastes memory in encoding process, and the Huffman algorithm takes up a lot of CPU time. In order to overcome the shortcomings of the said two algorithms, a hybrid LZW-Huffman algorithm is proposed in this paper. In the LZW encoding phase of the algorithm, binary tree structure is used to store entries, meanwhile the number of entries is counted, and then Huffman encoding is done according to the result of LZW compression. After testing and analysis, the hybrid algorithm can save memory resources in LZW encoding process, and the compression effect is better than the previous algorithm.
引文
[1] 李东风,周霞.网络数据库中海量数据压缩传递方法研究仿真[J].计算机仿真,2016,33(5):196-199.
[2] 鄢海舟,胥工,石东江,等.无损压缩算法LZW前缀编码优化及应用[J].计算机工程,2017,43(3):299-303.
[3] 赵文强,杨百龙,龚世忠,等.一种改进的基于LZW压缩编码的可逆信息隐藏算法[J].计算机应用研究,2016, 33(6):1783-1785.
[4] 施鹏,李敏,于涛,等.基于Huffman编码的XML数据压缩方法[J].北京化工大学学报:自然科学版,2013,40(4):120-124.
[5] 解瑞云,海本斋.基于自适应霍夫曼和Golomb-Rice混合编码的WSN无损压缩算法[J].计算机工程,2016,42(7):86-93.
[6] 李承泽,於剑波,张淼,等.一种基于Huffman和LZW编码的移动应用混淆方法[J].软件学报,2017,28(9):2264-2280.
[7] 崔方送.基于二叉树存储结构的LZW改进算法[J].太原学院学报:自然科学版,2018(1):29-32.
[8] [美] Khalid Sayood. 数据压缩导论(英文版)[M].3版. 北京:人民邮电出版社,2009:41-57.