Using inflate comes with a caveat, from zlib docs:
... Unlike the gunzip utility and gzread() (see
below), inflate() will not automatically decode concatenated gzip streams.
inflate() will return Z_STREAM_END at the end of the gzip stream. The state
would need to be reset to continue decoding a subsequent gzip stream.
unzip should handle this, probably by checking if more data exists in the input source and trying again to initialize and continue.
Using inflate comes with a caveat, from zlib docs:
unzip should handle this, probably by checking if more data exists in the input source and trying again to initialize and continue.