Huffman编码和译码的MATLAB实现.doc
Huffman编码及译码的MATLAB实现
沈逸峰
(上海师范大学 信息与机电工程学院,上海 200333)
摘要:本论文首先介绍了Huffman编码的原理以及与其它编码相比它的优势随在,随后基于Huffman编码的原理,利用MATLAB编译出26个英文字母加空格的Huffman码表以及相应的编码和译码程序。
关键词:Huffman,MATLAB
Implement of Huffman code and decode in Matlab
Shen Yi-feng
(School of Information and Engineering.Shanghai Normal University.Shanghai.200333)
Abstract:This article has mainly introduced the theory of Huffman Code and the advantage of this code.Then, we use MATLAB to find the code table for the English alphabet and space based on Huffman Code theory. Finally, we design the code and decode program for these alphabet and space based on the same theory.
Key words:Huffman, MATLAB
1.引言
Huffman编码属于信源编码,由于信源符号之间存在分布不均匀和相关性,致使信源存在冗余度。因此信源编码的主要任务就是减少冗余,从而提高编码的效率。信源编码的关键是信息论中的两个基本定理[1]:无失真