Suppose the dictionary looks like the following:
- Hexadecimal Entry
- Description
- C3
- Alphabet entry for character C; child count of 4. The first child
index is X'600' and the child characters are 1, 1, 1, and
2.
- 600
- Entry for character 1; 4 additional extension characters A, B,
C, and D; no children.
- 601
- Entry for character 1; 3 additional extension characters A, B,
and C; no children.
- 602
- Entry for character 1; 2 additional extension characters A and
B; no children.
- 603
- Entry for character 2; no additional extension characters; no
children.
The set of input strings longer than one character compressed by
this dictionary are:
- Hexadecimal Symbol
- String
- 600
- C1ABCD
- 601
- C1ABC
- 602
- C1AB
- 603
- C2
By taking advantage of the special processing when the second and
subsequent child characters match the first, you can reduce the number
of dictionary entries searched to determine the compression symbols.
For example, to find that X'601' is the compression symbol
for the characters C1ABC, the processing examines entry X'C3',
then entry X'600', then entry X'601'. Entry X'600' does
not match because the input string does not have all 4 extension characters.
There are alternate ways of setting up the dictionary to compress
the same set of input strings handled by this dictionary.