3.1.8.4.1.2.1 Copy-Offset Encoding

Encoding of the copy-offset value is performed according to the following table.

Copy-offset range

Encoding (binary header + copy-offset bits)

0...63

1111 + lower 6 bits of copy-offset

64...319

1110 + lower 8 bits of (copy-offset – 64)

320...8191

110 + lower 13 bits of (copy-offset – 320)

For example:

  • A copy-offset value of 3 is encoded as the binary value 1111 000011.

  • A copy-offset value of 128 is encoded as the binary value 1110 01000000.

  • A copy-offset value of 1024 is encoded as the binary value 110 0001011000000.

A copy-offset value MUST be followed by a length-of-match (L-o-M) value.