2.1.3.1.4 Dictionary

This algorithm uses a dictionary that behaves as a 4096-byte circular array. When advancing a read or write position within the dictionary, a reference beyond the last index of the array wraps to a reference to the first byte and then advances from there.

The dictionary conceptually has a write offset, a read offset, and an end offset, all of which are zero-based unsigned values, as follows:

  • Write offset: The index in the dictionary where the next byte is added.

  • Read offset: The index in the dictionary from which the next byte is read.

  • End offset: The number of bytes currently in the dictionary. It MUST be less than or equal to 4096.

The end offset is incremented until its value is 4096.