*LZ77结果输出
前面讲的所有过程都要在LZ77中实现,但别看前面说的多,关键就两个过程:将字符串插入字典+从字典中查找最长匹配。LZ77的代码规模也不大,只要理解了原理,分析源码还是比较简单的。
本章开头提到了一个字符串,
“As mentioned above,there are many kinds of wireless systems other than cellular.”,
我们现在使用LZ77将其进行初步压缩处理,处理结果为,
“As mentioned above,there a(3,4)many kinds of wireless system(3,20)(4,42) than cellular.”。