Re: [PATCH] Tolerate zlib deflation with window size < 32Kb
- From
Roberto Tyley <roberto.tyley@gmail.com>
- Date
- Aug 4, 2011, 07:40 UTC
- Message-ID
- <CAFY1edZLAjVRs0LUx6CvD9i5aZu6kZ1ecJdUsvZgmtGkajOqow@mail.gmail.com>
- In-Reply-To
- <CAFY1edZyO7oYDi+tV2mxbhBHY_cf2F0bD7+KF9rxmKYygSFAjA@mail.gmail.com>
On 4 August 2011 00:56, Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
> roberto.tyley@gmail.com writes: > > - if (map[0] == 0x78 && !(word % 31)) > > + if ((map[0] & 0x88) == 0x08 && !(word % 31)) > > Are you sure about this 0x88? Isn't it 0x8F or something?
Ah- yes, you're right - the bitmask should be 0x8F, because the lower nibble of a deflated zlib stream is 8 (8=deflate) and we want to match all 4 bits.
Thankfully the rest of the logic still applies - I'll submit an updated patch in a minute, once I've conquered my embarrassment :-)