A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-November/010352.html below:

[Python-Dev] zipfile.py and InfoZIP files

[Python-Dev] zipfile.py and InfoZIP filesM.-A. Lemburg mal@lemburg.com
Fri, 03 Nov 2000 20:08:17 +0100
I'm having trouble opening ZIP files created using InfoZIP's
zip utility (which uses zlib) with zipfile.py:

>>> x = z.read('README')
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "/home/lemburg/lib/zipfile.py", line 242, in read
    bytes = dc.decompress(bytes)
zlib.error: Error -3 while decompressing: incomplete dynamic bit lengths tree

Is this due to the installed zlib on my system being incompatible,
or is this a bug in zipfile.py ? I have libz version 1.1.3 and
zip version 2.2.

Also, I wonder why zipfile forces the mode flag to be 'r',
'w' and 'a' -- wouldn't it make more sense to only add 'b', etc.
to the mode flag instead ?!

The ZipFile is also missing some kind of method which
extracts files in the ZIP archive to a file-like object. This
would be very useful for extracting large files from a ZIP
archive without having to first read in the whole file into
memory.

Thanks,
-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4