question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unzip does not support >65,535 files

See original GitHub issue

How to reproduce

If you try to unzip or unzipSync a zip file containing >65,535 files, only 65,535 files will be listed.

For example:

// Load zip file containing 100,000 files into ArrayBuffer
const zipArray = new Uint8Array(zipBuffer);
const files = unzipSync(zipArray);

console.log(Object.keys(files).length) // 65535

The problem

This issue occurs without any error messages, the number of files is simply truncated to 65,535.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
101arrowzcommented, Jul 8, 2022

fflate isn’t looking at the Zip64 end-of-central-directory record so it can only use the number of files given in the standard 16-bit EOCD record. This should be fixable, I’ll look into it.

3reactions
101arrowzcommented, Oct 1, 2022

Fixed in v0.7.4. Sorry for the long delay!

Read more comments on GitHub >

github_iconTop Results From Across the Web

can't fully extract a zip file with more than 65535 files #184
Problem reported by @jdeepwell. http://deepwell.name/Apple_API_Reference.docset.zip is a 968.6 MB archive created by a native macOS tool.
Read more >
JDK-5084334 Cannot handle zip files with more than 65535 files
Zip a directory with more than 65535 files and then unzip it using java.util.zip. The unzip shows only x-65535 files where x is...
Read more >
[JDK-5084334] Cannot handle zip files with more than 65535 ...
Zip a directory with more than 65535 files and then unzip it using java.util.zip. The unzip shows only x-65535 files where x is...
Read more >
#527388 - can't handle zip archives with more than 65535 files ...
Package: zip Version: 3.0-1 Severity: important zip 3.0 cannot handle zip files with more than 65535 files, e.g. zip -9ru file.zip directory gives...
Read more >
Java - open zip file with more than 65535 files inside
I am facing interesting problem. I have in my ZIP archive more than 65535 files inside my archive and that is problem, because...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found