Thread (3 messages) 3 messages, 2 authors, 2016-06-15

Re: [PATCH] Tolerate zlib deflation with window size < 32Kb

flat view

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:45

Possibly related (same subject, not in this thread)

Roberto Tyley [off-list ref] writes:
On 4 August 2011 00:56, Junio C Hamano [off-list ref] wrote:
quoted
roberto.tyley@gmail.com writes:
quoted
-     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 :-)
Heh, don't get embarrassed. It was your well-written in-code comment that
helped me to follow the new logic well enough to spot it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help