From 174e0be2107db57abca285ab9939d88fa9066b8e Mon Sep 17 00:00:00 2001 From: circulosmeos Date: Mon, 26 Aug 2019 17:33:41 +0200 Subject: [PATCH] Patched window start position when restarting an index on a gzip stream with gzip's end of block terminators. --- gztool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gztool.c b/gztool.c index 0192de5..434ee38 100644 --- a/gztool.c +++ b/gztool.c @@ -1361,6 +1361,7 @@ local struct returned_output build_index( strm.avail_in -= 8; strm.next_in += 8; printToStderr( VERBOSITY_EXCESSIVE, "END OF GZIP passed @%ld (totout=%ld, ftello=%ld)\n", totin, totout, ftello(in) ); + totin+=8; // data is discarded from strm input, but it MUST be counted in total input break; // avail_in_0 doesn't need to be decremented as it tries to count raw stream input bytes }