Re: [PATCH] Wrap inflateInit to retry allocation after releasing pack memory
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 8, 2009, 05:23 UTC
- Message-ID
- <7vbpui8j6f.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.LFD.2.00.0901071941210.3283@localhost.localdomain>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 5 quoted lines
> +int git_inflate(z_streamp strm, int flush)
> +{
> +...
> + /* Z_BUF_ERROR: normal, needs a buffer output buffer */
> + case Z_BUF_ERROR:Thanks, but "needs a buffer output buffer" made me scratch my head somewhat.
... Z_BUF_ERROR if no progress is possible or if there was not enough room in the output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and inflate() can be called again with more input and more output space to continue decompressing.