decompress-zip icon indicating copy to clipboard operation
decompress-zip copied to clipboard

Cannot read large zip files

Open aarsilv opened this issue 11 years ago • 5 comments

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)

aarsilv avatar Dec 13 '14 18:12 aarsilv

@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.

prust avatar Dec 14 '14 17:12 prust

Yup, pretty sure this doesn't support ZIP64.

Though PR welcome for adding support for it.

sindresorhus avatar Jan 04 '15 16:01 sindresorhus

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.

breautek avatar Jan 24 '18 22:01 breautek

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

yaominator avatar Sep 08 '21 21:09 yaominator

It seems is the nodejs VM restriction but not this module

cw1427 avatar Apr 19 '22 07:04 cw1427