摘要
通过分析哈夫曼算法的思想,提出了一种改进的哈夫曼数据压缩算法。针对经典哈夫曼算法的不足,采用堆排序的思想构建哈夫曼树并得到哈夫曼编码,这种方法可以减少内存的读写次数,提高系统的响应时间。通过二次映射,把编码文件中每8位二进制转换成一个对应字符,提高了文件的压缩率,保证了最终生成的压缩文件的安全保密性。本文最后采用3个文本文件对改进的哈夫曼算法进行了压缩测试,实验表明,改进的算法,在压缩率上略强于经典算法。
Through the analysis of the Huffman algorithm,an improved Huffman algorithm of data compression is proposed.According to the classic Huffman algorithm,using the heap sort thought to build the Huffman tree and the Huffman coding,this method can reduce the memory read and write times,improving the system response time.Through the second mapping,each 8 encoded file binary is converted into a corresponding character,improve the compression ratio of files and ensure the security and confidentiality of the resulting compressed file.Finally,three text files compression test on the improved Huffman algorithm,experiments show that the improved algorithm,the compression ratio is slightly better than classic algorithm.
出处
《科技通报》
北大核心
2013年第6期22-24,共3页
Bulletin of Science and Technology
基金
国家自然科学基金(61163017)
关键词
数据压缩
哈夫曼算法
编码
二叉堆
data compression
huffman algorithm
coding
two binary heap