zlib-1.2.4 onwards makes it is impossible to read the last block of
incomplete gzip traces without this modification.
if (strm->avail_in == 0 && gz_avail(state) == -1)
return -1;
if (strm->avail_in == 0) {
if (strm->avail_in == 0 && gz_avail(state) == -1)
return -1;
if (strm->avail_in == 0) {
gz_error(state, Z_DATA_ERROR, "unexpected end of file");
return -1;
gz_error(state, Z_DATA_ERROR, "unexpected end of file");
return -1;
+#else
+ /* APITRACE: Ignore unexpected end of file. */
+ ret = 0;
+ break;
+#endif
}
/* decompress and handle errors */
}
/* decompress and handle errors */