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.

[FEATURE] Support ZIP64

See original GitHub issue

As discussed on the roadmap and in #12, ZIP64 support is a highly desirable improvement for client-zip as it allows the creation of ZIP files larger than 4GB and containing files larger than 4GB themselves.

Once implemented, ZIP64 output would be the default for client-zip. That is consistent with other ZIP libraries, and the overhead is negligible. Making it the default is a slightly breaking change, but ZIP64 justifies a major version bump anyway.

Update 1:

While BigInts themselves — flawed though they may be — are finally available in browsers, the BigInt64 ArrayBuffer features have not yet landed in all browsers. But they can be polyfilled quite easily (actually I only need one: DataView.setBigUint64).

So that’s what I’m going to do. The plan is to release client-zip 2.0 soon, with ZIP64. However, it will only work in browsers that support BigInts.

Update 2:

I just got the wrong byte order for the Zip64 extra field signature…

Update 3:

After some hexdumping and reverse-engineering of Zip64 files, I got client-zip to make valid ones too (or at least, files that 7zip and unzip don’t complain about).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Owpaccommented, Mar 15, 2021

To give you some feedbacks, I tested version 1.3.0 and 2.0.0-rc2 with a 5,63Go file. I’m on a Macbook Pro M1, with an implementation of client-zip with Stream Saver. I’m also using the default Mac unarchiver.

On v2.0.0-rc2, everything seems to work perfectly thanks to your integration of Zip64 format. On v1.3.0, I successfully downloaded my file in a zip, but I can’t extract it without an error which is normal since Zip32 can’t support file over 4Go.

1reaction
Touffycommented, Mar 15, 2021

Actually, it works now — as far as I can tell. I was waiting for some feedback from other users to release version 2.0.0 but you can get version 2.0.0-rc2 already with Zip64 (and tell me if you happen to make a corrupted archive with it).

Thanks for the link. I’ll make sure I haven’t missed something.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ZIP (file format) - Wikipedia
ZIP is an archive file format that supports lossless data compression. A ZIP file may ... The File Explorer in Windows XP does...
Read more >
Key Features | ComponentOne Zip for .NET - GrapeCity
C1Zip now supports Zip64 files. This allows for entries longer than the usual 4 gig limit and also allows more entries per zip...
Read more >
How can I create ZIP64 file and test it? - Super User
The archival tool 7zip supports zip64 archives. You could use that to generate your test case or validate it.
Read more >
Zip library does not support Zip64 NTFS file format · Issue #1877
The Zip library we are currently using for the unzipFile command does not handle the Zip64 extension that makes it support >4 GiB...
Read more >
Any zip tools to create zip64 files? - Google Groups
WINRAR and 7ZIP, all three can handle zip64 files but can't create zip64 file (or I haven't found how to use ... One...
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