From: Eric Biggers Date: Thu, 29 May 2014 00:05:19 +0000 (-0500) Subject: lzx-compress.c: Simplify calculation of position footer X-Git-Tag: v1.7.0~73 X-Git-Url: https://wimlib.net/git/?a=commitdiff_plain;h=3adc1ac1ebe221427857d8f6fd06cfb823b4bea6;p=wimlib lzx-compress.c: Simplify calculation of position footer --- diff --git a/src/lzx-compress.c b/src/lzx-compress.c index e1b65c7c..ba3b10aa 100644 --- a/src/lzx-compress.c +++ b/src/lzx-compress.c @@ -962,8 +962,8 @@ lzx_tally_match(unsigned match_len, unsigned match_offset, /* 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. */