From: Linus Torvalds Date: Wed, 06 Jul 2005 00:04:28 GMT Subject: Re: zlib experts, please.. Message-ID: In-Reply-To: On Tue, 5 Jul 2005, Linus Torvalds wrote: > > 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