Open magnus-rattlehead opened 2 years ago
Nevermind. archiving software doesn't complain about corrupted zips.
It would be awesome if this was built intro a transform stream like in: https://github.com/transcend-io/conflux/blob/master/src/write.js
FYI, the solution here gave me corrupt zip files. I asked ChatGPT to rewrite the original one and did a bit of cleanup to end up on a working file... Tested with 10.000 files which result in a total zip file of 9GB.
The file is damaged because the variable zip64
is not switched to true
in a timely manner, resulting in some files being in zip32 format and some in zip64 format. However, unzip cannot correctly recognize this. To solve the file damage and "Header error", I set zip64
to be true by default. This way, it's okay!
Feel free to test. I used the Sintel movie and a 10GB file created by fallocate. Testing shows that the zip works. For some reason on my zip archiver (Ark from KDE), it complains about a corrupted zip, but is able to read and extract successfully. zip -T archive.zip confirms that it is valid. Feel free to test it.