[Python-Dev] Re: [Pythonmac-SIG] zipfile still has 2GB boundary bug

Bob Ippolito bob at redivi.com
Mon Apr 25 15:53:13 CEST 2005

On Apr 25, 2005, at 7:53 AM, Charles Hartman wrote:

>> Someone should think about rewriting the zipfile module to be less 
>> hideous, include a repair feature, and be up to date with the latest 
>> specifications <http://www.pkware.com/company/standards/appnote/>.
> -- and allow *deleting* a file from a zipfile. As far as I can tell, 
> you now can't (except by rewriting everything but that to a new 
> zipfile and renaming). Somewhere I saw a patch request for this, but 
> it was languishing, a year or more old. Or am I just totally missing 
> something?

No, you're not missing anything.  Deleting is hard, I guess.  Either 
you'd have to shuffle the zip file around to reclaim the space, or just 
leave that spot alone and just remove its entry in the central 
directory.  You'd probably want to look at what other software does to 
decide which approach to use (by default?).  I don't see any markers in 
the format that would otherwise let you say "this file was deleted".


More information about the Python-Dev mailing list