[Python-Dev] request for review: patch 1446489 (zip64 extensions in zipfile)

Ronald Oussoren ronaldoussoren at mac.com
Tue Jun 13 10:08:54 CEST 2006


As I mentioned earlier I'd like to get patch 1446489 (support for  
zip64 extensions in the zipfile module) in python 2.5. The patch  
should be perfectly safe, it comes with unittests and a documentation  
update. I'm also using this version of zipfile in (closed-source)  
projects to handle huge zipfiles.

There are two backward incompatbile changes, both minor. First of all  
ZipInfo will lose the file_offset attribute because calculating it  
when opening a zipfile is very expensive (it basically requires a  
full scan of the zipfile). This should be harmless, I couldn't come  
up with a usecase other then reimplementing the read method outside  
of zipfile. The second incompatibility is that zipfile will try to  
raise an error when the zipfile gets to large, instead of reducing  
the zipfile to garbage as the current revision of zipfile does.

The major changes in the patch are: support for ZIP64 extensions  
which make it possible to handle zipfiles that are larger than 2  
GByte in size and a significant speed-up of zipfile opening when  
dealing with zipfiles that contain a large amount of files. These are  
in one patch because large zipfiles support isn't very useful when  
opening the zipfile takes more than 30 seconds.


More information about the Python-Dev mailing list