2.6.3 Converting Position Footer into Verbatim Bits or Aligned Offset Bits
The position footer can be further subdivided into verbatim bits and aligned offset bits if the current value of the Block Type field is 010 (aligned offset), as specified in section 2.3.1.1. If the current block is not an aligned offset block, there are no aligned offset bits, and the verbatim bits are the position footer.
If aligned offsets are used, the lower 3 bits of the position footer are the aligned offset bits, while the remaining portion of the position footer is the verbatim bits. In the case where fewer than 3 bits are in the position footer (for example, formatted offset is <= 15), it is not possible to take the "lower 3 bits of the position footer", and therefore, there are no aligned offset bits and the verbatim bits and the position footer are the same.
In situations where it is determined that there is a relatively larger number of position footers with identical lower 3 bits, the aligned offset block could be used to reduce the number of bits required to represent the position footer component in the match encoding.
The verbatim block could be used when the lower 3 bits of the position footer are relatively evenly distributed.
The following is a pseudocode example of splitting the position footer into verbatim bits and aligned offset.
-
if block_type is aligned_offset_block then if formatted_offset <= 15 then verbatim_bits ← position_footer aligned_offset ← null else aligned_offset ← position_footer verbatim_bits ← position_footer >> 3 endif else verbatim_bits ← position_footer aligned_offset ← null endif