2.1.3.1.5 Dictionary Reference

A dictionary reference is a 16-bit packed structure stored in the value of the REFERENCE field, as specified in section 2.1.3.1.1. The dictionary reference is stored in big-endian form on the wire. The format of this reference is as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Offset

Length

Offset (12 bits):  This field contains an index from the beginning of the dictionary that indicates where the matched content will start.

An offset that equals the write offset of the dictionary has the special meaning of completion of all compressed data, as specified in section 2.3.3.2, step 8. In this case, the writer MUST set the Length field to zero, and readers SHOULD ignore the Length field.

Length (4 bits):  This value indicates the length of the matched content and is 2 bytes less than the actual length of the matched content.