Re: zlib experts, please..
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jul 6, 2005, 00:04 UTC
- Message-ID
- <Pine.LNX.4.58.0507051701101.3570@g5.osdl.org>
- In-Reply-To
- <Pine.LNX.4.58.0507051644100.3570@g5.osdl.org>
On Tue, 5 Jul 2005, Linus Torvalds wrote:
Show 5 quoted lines
> > But what I care about is that when git-unpack-objects sees that it wants a > zero-byte object, and asks zlib to unpack it, zlib will not actually use > the bytes it wrote - it will just say "oh, you wanted zero bytes, here's > zero bytes". Which means that the stream handling gets upset.
Actually, never mind. zlib does exactly the right thing, and eats the 8 bytes of header that it wrote for "empty". The real culprit was that git-unpack-objects incorrectly made that zero a special case on reading, but not writing.
So just ignore me. zlib actually does what I expected it to do, even for the zero case.
Linus