t a l l _
initialize Code Table with entries 0 to 26 Input is 20 01 12 12 00
set Code to the first input value; (20)
look up in Code Table and output t
repeat
OldCode=Code; 20
Code=next input value; 01
if in Code Table
then {
look up in Code Table and output a
Prefix=OldCode entry; t
Suffix=First Value from the Code Table entry; a
}
else {
Prefix=OldCode entry;
Suffix=First Value from the Prefix;
Output Prefix and Suffix;
}
add Prefix+Suffix as an entry in the Code Table; ta
until complete;