* it possible to implement this code:
*
* - divsufsort (author: Yuta Mori), for the suffix array construction code,
* it possible to implement this code:
*
* - divsufsort (author: Yuta Mori), for the suffix array construction code,
*
* - "Linear-Time Longest-Common-Prefix Computation in Suffix Arrays and Its
* Applications" (Kasai et al. 2001), for the LCP array computation.
*
* - "Linear-Time Longest-Common-Prefix Computation in Suffix Arrays and Its
* Applications" (Kasai et al. 2001), for the LCP array computation.
/* If there is a length footer, output it using the
* length Huffman code. */
/* If there is a length footer, output it using the
* length Huffman code. */
bitstream_put_bits(out, codes->codewords.len[len_footer],
codes->lens.len[len_footer]);
bitstream_put_bits(out, codes->codewords.len[len_footer],
codes->lens.len[len_footer]);
/* The match offset shall be encoded as a position slot (itself encoded
* as part of the main symbol) and a position footer. */
position_slot = lzx_get_position_slot(match_offset, queue);
/* The match offset shall be encoded as a position slot (itself encoded
* as part of the main symbol) and a position footer. */
position_slot = lzx_get_position_slot(match_offset, queue);
- position_footer = (match_offset + LZX_OFFSET_OFFSET) &
- ((1U << lzx_get_num_extra_bits(position_slot)) - 1);
+ position_footer = (match_offset + LZX_OFFSET_OFFSET) -
+ lzx_position_base[position_slot];
/* The match length shall be encoded as a length header (itself encoded
* as part of the main symbol) and an optional length footer. */
/* The match length shall be encoded as a length header (itself encoded
* as part of the main symbol) and an optional length footer. */