[issue28719] zipfile increase in size

Serhiy Storchaka report at bugs.python.org
Sat Nov 19 04:14:23 EST 2016


Serhiy Storchaka added the comment:

If the output file is not seekable, zipfile sets bit 3 in file header flags and writes 12 or 20 (if ZIP64 extension is used) additional bytes after the compressed data. These bytes contain the CRC, compressed and uncompressed sizes. Corresponding fields in local file header are set to zero.

In case of writestr() this can be considered as a regression, since the CRC and sizes can be calculated before writing compressed data and saved in local file header.

But it would be not easy to fix this.

----------
assignee:  -> serhiy.storchaka
components: +Library (Lib)
stage:  -> needs patch
type: resource usage -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28719>
_______________________________________


More information about the Python-bugs-list mailing list