
CHAPTER 3 / UNIVERSAL CODES 75
1. The binary representation of the run symbol, say x, is used to encode 0 bits in the run-length
and the value x @ 1 is used for the 1 bits, emitting least-significant bits first. (0 represents
an Exclusive-Or). Any character not in the set {x, x ~ 1, x ~ 2} terminates the number (and
implies the most-significant 1 bit with the simple binary decode). An x @ 2 is used as count
terminator if the run is terminated by x ~ 1 or x ~ 2, and it is followed immediately by the
terminating character.
When using this code for run compression it seems desirable to trigger it from a run of at
least three identical ...