0
1.9kviews
Perform LZW dictionary compression on the following text string : wabbawabbawabbawabbawoowoowoo
1 Answer
written 7.7 years ago by |
Initial dictionary:
Index | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|
Entry | - | a | b | o | w |
Index | Etry | Index | Entry |
---|---|---|---|
2 | a | 13 | awa |
3 | b | 14 | abb |
4 | o | 15 | baw |
5 | w | 16 | wabb |
6 | wa | 17 | bawo |
7 | ab | 18 | oo |
8 | bb | 19 | ow |
9 | ba | 20 | wo |
10 | aw | 21 | oow |
11 | wab | 22 | woo |
12 | bba |