We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How should one proceed to generate a valid empty gzip file using CodecZlib?
Here is what I tried:
import CodecZlib gz = CodecZlib fh = gz.GzipCompressorStream(open("test_out.gz", "w")) close(fh)
However, the following results in an empty file (zero bytes) that gzip cannot handle properly:
gzip
$ zcat test_out.gz gzip: test_out.gz: unexpected end of file $
I can generate valid gzipped file using Python:
>>> from gzip import open as gzopen >>> with gzopen("test_out.gz", "w") as fh: ... pass ...
The resulting file is not really empty (a few bytes), and gzip does not complain when I try to zcat it:
$ zcat test_out.gz $
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How should one proceed to generate a valid empty gzip file using CodecZlib?
Here is what I tried:
However, the following results in an empty file (zero bytes) that
gzip
cannot handle properly:I can generate valid gzipped file using Python:
The resulting file is not really empty (a few bytes), and
gzip
does not complain when I try to zcat it:The text was updated successfully, but these errors were encountered: