该gzip格式指定一个名为领域
ISIZE是:
它包含原始(未压缩)输入数据模2 ^ 32的大小。
在gzip.py中,我假设这是您用于gzip支持的内容,其中有一个称为define的方法
_read_eof,如下所示:
def _read_eof(self): # We've read to the end of the file, so we have to rewind in order # to reread the 8 bytes containing the CRC and the file size. # We check the that the computed CRC and size of the # uncompressed data matches the stored values. Note that the size # stored is the true file size mod 2**32. self.fileobj.seek(-8, 1) crc32 = read32(self.fileobj) isize = U32(read32(self.fileobj)) # may exceed 2GB if U32(crc32) != U32(self.crc): raise IOError, "CRC check failed" elif isize != LOWU32(self.size): raise IOError, "Incorrect length of data produced"
在那里,您可以看到
ISIZE正在读取该字段,但这只是为了将其与
self.size错误检测进行比较。然后,这应意味着
GzipFile.size存储实际的未压缩大小。但是,我
认为 它没有公开公开,因此您可能必须破解它才能公开。不太确定,对不起。
我现在只是看了所有这些,而我还没有尝试过,所以我可能是错的。我希望这对您有用。对不起,如果我误解了你的问题。



