why zip64_limit defined as 1<<31 -1?

Chris Angelico rosuav at gmail.com
Wed Jan 28 16:36:48 EST 2015


On Thu, Jan 29, 2015 at 5:53 AM, jesse <chat2jesse at gmail.com> wrote:
> should not it be 1<<32 -1(4g)?
>
> normal zip archive format should be able to support 4g file.
>
> thanks

1<<31-1 is the limit for a signed 32-bit integer. You'd have to look
into the details of the zip file format to see whether that's the
official limit or not; it might simply be that some (un)archivers have
problems with >2GB files, even if the official stance is that it's
unsigned.

ChrisA



More information about the Python-list mailing list