Run Information

Compressing data when the value of the COMPTYPE field, as specified in section, is COMPRESSED is most easily understood and implemented if the writer does so one run at a time, writing each run to the output as it is completed. Information stored for a run includes:

  • The current control byte (the CONTROL field, as specified in section for the run, represented as a BYTE ([MS-DTYP]).

  • A mask (called the control bit), represented as a BYTE. The writer uses the control bit to write to the control byte, as specified in section

  • A token buffer, 16 bytes in length.

  • The offset, in bytes, into the token buffer (the "token offset"), representing the next position in the buffer to which a token will be written.

In the implementation specified in the remainder of section 2.3, a run is considered completed when the value of the control bit is 0x80 after a token has been written.