[Tutor] memory error files over 100MB

Cheetah1000 aalokie at hotmail.com
Mon Mar 16 15:53:22 CET 2009

Alan Gauld wrote:
> "Sander Sweers" <sander.sweers at gmail.com> wrote
>> ...  I would expect zf.read(zfilename) to only read the
>> requested file in the zipfile.
> That's a dangerous assumption. You might be right but I'd want to
> do some tests first to see. But if even one zipped file was big the
> same would apply.
> Alan G.

I can't speak for Python 2.6, but using Jython 2.1 (Python 2.1 for Java),
the code only looks at the file you are trying to extract()/read().  Near
the end of the zip archive is a directory of all the files in the archive,
with the start position and length of each file.  Jython's zipfile (written
in python, naturally) only reads from the start position to the end of the
file.  More information on this can be found by searching for 'Central
Directory' of a zip archive.  Still doesn't explain the 100M problem though. 
I've having the same issue extracting 20MB from a 22MB zip.  It could be
Python; or it could be, in my case, a java issue.  
View this message in context: http://www.nabble.com/memory-error-files-over-100MB-tp22437060p22539945.html
Sent from the Python - tutor mailing list archive at Nabble.com.

More information about the Tutor mailing list