$ echo -e "@seq\nAAAAA\n+\nABCDE" | gzip > _normal.gz
$ (gzip < /dev/null;cat _normal.gz) > _empty.gz
$ ./htsfile _normal.gz
_normal.gz: FASTQ gzip-compressed sequence data
$ ./htsfile _empty.gz
_empty.gz: empty gzip-compressed data
$ ./test/test_view _empty.gz
Unsupported or unknown category of data in input file
Zlib's inflate ends with Z_STREAM_END and then repeated calls to get more won't give any difference, so we need the explicit reset to move forwards with the next block.
Demonstration:
Zlib's
inflate
ends withZ_STREAM_END
and then repeated calls to get more won't give any difference, so we need the explicit reset to move forwards with the next block.