参考书《数据压缩导论(第4版)》 Page 121 7,8
解码:
000 000 000 314 141 421 231 421 421 2314
000 000 000 rat ata tba bra tba tba brat
编码:
查找缓冲区 | 先行缓冲区 | ||
ratatatatat_a_rat_at_a_rat | <0, 0, 3> | ||
r | atatatatat_a_rat_at_a_rat | <0, 0, 1> | |
ra | tatatatat_a_rat_at_a_rat | <0, 0, 4> | |
rat | atatatat_a_rat_at_a_rat | <2, 8, 2> | |
tatatatat_ | a_rat_at_a | _rat | <3, 1, 2> |
tatatat_a_ | rat_at_a_r | at | <0, 0, 3> |
tatatat_a_ | at_at_a_ra | t | <6, 4, 4> |
t_a_rat_at | _a_rat | <9, 6, 0> |
索引 | 项 | 接收序列 |
1 | S | |
2 | ø | |
3 | I | |
4 | T | |
5 | H | |
6 | TH | 4 |
7 | HI | 5 |
8 | IS | 3 |
9 | Sø | 1 |
10 | øI | 2 |
11 | ISø | 8 |
12 | øH | 2 |
13 | HIS | 7 |
14 | SøH | 9 |
15 | HIT | 7 |
4 |
由词典的出源码为THISøHISøHIT