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.

More files than entryCount

See original GitHub issue

My apologies if this is addressed elsewhere. I couldn’t find it in the README or Issues.

I have a zip file with ~70K files, but the file catalog says it has only 14,202. On my Mac: unzip -Zh file.zip yields “Zip file size: 139476498 bytes, number of entries: 14202” unzip -l file.zip yields “557051138 … 79738 files”

I’m not sure where the discrepancy comes from, but if I unzip the file using unzip on the command line, or double click it in Finder, all ~70K files unzip.

Using yauzl, it only unzips the first 14202 files and then ends/closes. I tried with my own implementation and also using examples/unzip.js in the repo.

Is there some way to configure yauzl to unzip all the files in the zip, regardless of the reported number of entries?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
thejoshwolfecommented, Jan 20, 2018

After much yak shaving (rewriting my zip file analysis tool to be more memory conservative (and developing the programming language it is written in)), I’ve figured out what the issue is with this zipfile. It’s pretty much the same problem as issue #69.

When the Mac Archive Utility needs to write the 16-bit entry count in the end of central directory record, it doesn’t check for overflow, and simply writes the lower 16 bits of the entry count. In the OP here, the real entry count was 79738 or 0x1377a, and Archive Utility wrote 14202 or 0x377a in the zip file metadata. In the zipfile you linked me, the numbers were 0x14595 and 0x4595.

This means that the metadata is an outright lie about the number of entries in the zipfile. This is absolutely a bug in Archive Utility, and it’s a nasty one too. The correct behavior would have been to use ZIP64 format, but Archive Utility has no idea what that is.

There may or may not be any way to correctly and reliably recover from this corruption. I’m still thinking about it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ResourceType For resource entry index is beyond type ...
are you linking any libraries to your project? The error means that there are more resources than expected. · @zipo13 Yes, I use...
Read more >
ANR4948E - IBM
ANR4948E The list file named list file name contains more than max entry count entries. Explanation. While reading a list file, the server...
Read more >
How can I find corrupted media in my Avid MediaFiles folders ...
1. Quit Media Composer. Navigate to your media drive(s). Locate your MXF / Avid MediaFiles folder(s). ... (Check so there are no more...
Read more >
entryCount
Retrieves the number of times the current workflow step has been entered by the current revision. This variable can be used to create...
Read more >
JSON Threat Protection runtime error troubleshooting
Exceeded object entry count, The maximum number of entries ... the input JSON payload has more than 5 entries, then this error is...
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