📄 ihuffman.m
字号:
function decode_x=ihuffman(encode_x,h,sortindex)
len=length(encode_x);
decode_x=[];
for i=1:4:len,
if encode_x(1,i:i+3)==h(find(sortindex==1),1:4);
decode_x=[decode_x,'p'];
end
if encode_x(1,i:i+3)==h(find(sortindex==2),1:4);
decode_x=[decode_x,'n'];
end
if encode_x(1,i:i+3)==h(find(sortindex==3),1:4);
decode_x=[decode_x,'z'];
end
if encode_x(1,i:i+3)==h(find(sortindex==4),1:4);
decode_x=[decode_x,'t'];
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -