bower / decompress-zip

Module that decompresses zip files
MIT License
102 stars 76 forks source link

Cannot read large zip files #40

Open aarsilv opened 9 years ago

aarsilv commented 9 years ago

Seems like max file entry length of 4096 is hard coded. For large zip files we get errors like:

File entry unexpectedly large: 36366 (max: 4096)
prust commented 9 years ago

@Zugwalt: I've never seen this, even with 1gb zip files... oh, here's something relevant from wikipedia's article on the zip file format:

ZIP64 The original .ZIP format had a 4 GiB limit on various things (uncompressed size of a file, compressed size of a file and total size of the archive), as well as a limit of 65535 entries in a .ZIP archive. In version 4.5 of the specification (which is not the same as v4.5 of any particular tool), PKWARE introduced the "ZIP64" format extensions to get around these limitations

So perhaps the "max: 4096" is referring to megabytes (4gb)?

According to the article above, it looks like some libraries support zip64 and others don't.

sindresorhus commented 9 years ago

Yup, pretty sure this doesn't support ZIP64.

Though PR welcome for adding support for it.

breautek commented 6 years ago

Realized this is an older issue, but just in case this helps anyone, I had this error on a 300kb zip file, so completely unrelated to the 4GiB limit.

In my case, I was streaming a zip file from elsewhere and I had a logical error that prevented the zip file to be completely written, creating an incomplete/corrupted zip file. Attempting to decompress it gave me this error, which in my context, the error was pretty misleading.

yaominator commented 3 years ago

seeing the same issue, do we have fix for this? My file is about 350M

cw1427 commented 2 years ago

It seems is the nodejs VM restriction but not this module