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 <rep...@bugs.python.org>
<http://bugs.python.org/issue28719>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to