transcend-io / conflux

Zip/unzip files of any size in the browser using streams.
MIT License
96 stars 14 forks source link

zip64 format #8

Open jimmywarting opened 5 years ago

jimmywarting commented 5 years ago

Write zip's as zip64 format to support larger files then 4gb

jimmywarting commented 4 years ago

note to self:

vincaslt commented 4 years ago

Could it be the reason why zip file downloaded on windows can't be extracted with default Extract all... command on windows? 7zip works fine though.

jimmywarting commented 4 years ago

possible

christianwengert commented 3 years ago

I started to look into this too. FYI I found this graphical overview of zip32 and zip64, which seems to make it easier to understand.

would love to see this in streamsaver or this library!

https://blog.yaakov.online/zip64-go-big-or-go-home/

Touffy commented 3 years ago

Some feedback from implementing this in client-zip : the above article was helpful to some extent but not entirely appropriate for a streaming implementation. What seems to work is to

and then, if after streaming the file data you find it's bigger than 4GB, or the total current size of the stream is bigger than 4GB,

finally, if any file was larger than 4GB or the central repository offset is larger than 4G

The one thing I couldn't figure out is the "version needed to read" field in file header. Since we're streaming, we can't know in advance whether the file will be readable by just version 2 or at least 4.5. So I write 4.5 all the time. The ZIP readers I've tried my files on don't mind.

FallingHazard commented 2 years ago

Was there any progress on this?

Mekacher-Anis commented 1 year ago

Bump ⬆️ first, thank you for the awesome library !! has there been any progress on this ? I think this is why the native windows zip archiver can't read/extract the files. When trying to extract the files you get this image

Mekacher-Anis commented 1 year ago

Bump ⬆️ first, thank you for the awesome library !! has there been any progress on this ? I think this is why the native windows zip archiver can't read/extract the files. When trying to extract the files you get this image

Never mind, it's just a stupid mistake on my side, I was prepending / to the file name and that doesn't work with the native archive utility of windows and macos