LZW数据压缩算法的原理分析

2019-12-30 13:04:36于丽

 

.....
当进行到第12步的时候,标号集应该为

0 1 2 3 4 5 6 7 8 9 10 11
A B C D Clear End AB BA 6A 8B BB 10A

 

8.LZW算法的伪代码实现


STRING = get input character
WHILE there are still input characters DO
 CHARACTER = get input character
 IF STRING+CHARACTER is in the string table then
  STRING = STRING+character
 ELSE
  output the code for STRING
  add STRING+CHARACTER to the string table
  STRING = CHARACTER
 END of IF
END of WHILE
output the code for STRING 

9.LZW算法的流程图

没有安visio,画了一个,比较难看,

LZW,数据压缩算法,原理

以上就是本文的全部内容,希望能给大家一个参考,也希望大家多多支持ASPKU。


注:相关教程知识阅读请移步到c#教程频道。