When searching on how to inflate gzip compressed data on iOS, the following method appears in number of results:
- (NSData *)gzipInflate
{
if ([self leng
Yes, looks like a bug. According to this annotated example from the zlib site, Z_BUF_ERROR
is just an indication that there is no more output unless inflate() is provided with more input, not in itself a reason to abort the inflate loop abnormally.
In fact, the linked sample seems to handle Z_BUF_ERROR
exactly like Z_OK
.