This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: 64-bit zip problems
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: akuchling, nnorwitz, tim.peters
Priority: normal Keywords:

Created on 2001-08-20 05:35 by tim.peters, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Messages (5)
msg6074 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2001-08-20 05:35
This is from c.l.py.  There's not enough info (e.g., 
which OS, which compiler, which Python), but in case 
anyone is wondering what to do with their IA64 box ...

From: John Wiegley
Sent: Thursday, August 16, 2001 6:14 PM
To: python-list@python.org
Subject: Problem with zipfile between 32-bit and 64-bit

Using the test script below, run it once on an Intel
32-bit platform.  This produces test.zip, which
extracts hello.py.

Then take the test script and test.zip to an ia64
platform, and run it again.  The file it extracts has
0 bytes.

I've run into other problems between ia32 and ia64,
such as bad checksums, and was wondering if anyone
knew anything about this?

Thanks,
  John Wiegley <johnw@gnu.org>

----[ file: ziptest.py ]-------------------------------
---------------
import os
import zipfile
import string

if not os.path.exists('test.zip'):
    zip = zipfile.ZipFile('test.zip', 'w')
    zip.write('ziptest.py', 'hello.py')
    zip.close()

zip = zipfile.ZipFile('test.zip', 'r')
if hasattr(zip, 'namelist'):
    files = zip.namelist()
else:
    files = zip.listdir()

for file in files:
    file = apply(os.path.join, string.split
(file, '\\'))

    data = open(file, 'wb')
    print "unarchiving", file
    data.write(zip.read(file))
    data.close()
msg6075 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2001-09-04 19:51
Logged In: YES 
user_id=11375

The zlib module seems to use struct.pack('l') for packing 
some values, which should be 64-bits on a 64-bit platform.
Maybe that's the bug.
msg6076 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2001-09-04 20:39
Logged In: YES 
user_id=31435

Should they really be 64 bits on a 64-bit box?  Looks like 
zipfile.py is using a standard (as opposed to native) pack 
format, in order to ensure platform-independent layout.
msg6077 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2002-07-02 20:25
Logged In: YES 
user_id=31435

Could someone try this again?  binascii.crc32() returned 
different results on some 64-bit boxes than on 32-bit boxes, 
and that's been fixed.  See

<http://www.python.org/sf/576327>
msg6078 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-09-13 00:47
Logged In: YES 
user_id=33168

I tested this on x86/Linux and alpha/Tru64 and it seems to
work.  Closing.
History
Date User Action Args
2022-04-10 16:04:20adminsetgithub: 35011
2001-08-20 05:35:47tim.peterscreate