how can I put a 1Gb file in a zipfile??
bennie
rotzjes at wanadoo.nl
Sun Mar 20 14:40:18 EST 2005
Christos TZOTZIOY Georgiou wrote:
> On Sun, 20 Mar 2005 10:44:06 +0100, rumours say that Bennie <rotzjes at wanadoo.nl>
> might have written:
>
>
>>Hi,
>>
>>I have a problem with ZipFile.
>>It works okay untily I come across a file that is greater then 1Gb.
>>Then it exit with the error:
>> OverflowError: long int too large to convert to int
>>
>>How can I fix this?
>
>
> AFAIR there is a 4GiB (or 2GiB) size limit applying both to files added to zip
> and to the total size of the zip file. This limit comes from the zip file
> specification (32 bit offsets).
>
>
>>souce:
>> zip = zipfile.ZipFile(file, 'w')
>>
>> for all in os.walk(os.getcwd()):
>> path = all[0]
>> for document in all[2]:
>> zipaccview.write(path + os.sep + document)
>>
>> zip.close()
>
>
> Can it be that you are creating a zip file that its total size exceeds the
> limit?
That is possible.
But with Winzip program it can.
How come that is with ZipFile not works
More information about the Python-list
mailing list