[Patches] [ python-Patches-442128 ] Creates zipfiles that java can read
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 05 Sep 2001 11:48:24 -0700
Patches item #442128, was opened at 2001-07-17 12:22
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=442128&group_id=5470
Category: None
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: Finn Bock (bckfnn)
Assigned to: Nobody/Anonymous (nobody)
Summary: Creates zipfiles that java can read
Initial Comment:
Zip files create by zipfile.py cannot be read with
java's zipfile support because the CRC/sizes when
written after the file is not marked with a EXT header.
With this patch java can reads zipfiles with entries
added with writestr() and deflated files added with
write().
----------------------------------------------------------------------
>Comment By: Finn Bock (bckfnn)
Date: 2001-09-05 11:48
Message:
Logged In: YES
user_id=4201
This patch is rejected in favor of Jim's patch (#458701),
which is far better.
----------------------------------------------------------------------
Comment By: James C. Ahlstrom (ahlstromjc)
Date: 2001-09-05 05:37
Message:
Logged In: YES
user_id=64929
Currently, zipfile.py writes flag 0x08 to indicate that the
CRC and file sizes follow the file data. It writes the file
header with zero CRC and file sizes, writes the file data,
and then writes three longs. Java seems to require a 4 byte
header, then three longs. The pkware appnote.txt document
requires just three longs with no header. I am unable to
find a justification for the header, and I do not want to be
inconsistent with the zip specification. Therefore I oppose
this patch.
Instead I propose a new patch. Zipfile.py will write flags
0x00, the file header, then the file data. Then it will
seek backwards and write the correct CRC and file sizes in
the file header, and then seek to the end of the file data.
Flag 0x08 is NOT set, and the correct CRC and file sizes are
in the header. This satisfies the zip specification and
Java at the minor cost of two seek()'s and a tell(). I will
submit this as a new patch as I can't seem to attach it to
this one.
Jim Ahlstrom
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=442128&group_id=5470