This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ericg
Recipients Ericg
Date 2015-05-27.15:59:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432742343.38.0.978535326882.issue24301@psf.upfronthosting.co.za>
In-reply-to
Content
I have a file whose first four bytes are 1F 8B 08 00 and if I use gunzip from the command line, it outputs:

gzip: zImage_extracted.gz: decompression OK, trailing garbage ignored

and correctly decompresses the file. However, if I use the gzip module to read and decompress the data, I get the following exception thrown:

  File "/usr/lib/python3.4/gzip.py", line 360, in read
    while self._read(readsize):
  File "/usr/lib/python3.4/gzip.py", line 433, in _read
    if not self._read_gzip_header():
  File "/usr/lib/python3.4/gzip.py", line 297, in _read_gzip_header
    raise OSError('Not a gzipped file')

I believe the problem I am facing is the same one described here in this SO question and answer:

http://stackoverflow.com/questions/4928560/how-can-i-work-with-gzip-files-which-contain-extra-data


This would appear to be serious bug in the gzip module that needs to be fixed.
History
Date User Action Args
2015-05-27 15:59:03Ericgsetrecipients: + Ericg
2015-05-27 15:59:03Ericgsetmessageid: <1432742343.38.0.978535326882.issue24301@psf.upfronthosting.co.za>
2015-05-27 15:59:03Ericglinkissue24301 messages
2015-05-27 15:59:03Ericgcreate