Zipfile signature not read
See original GitHub issueReferencing this issue https://github.com/joyent/node/issues/6384 here as it started out with me trying to use unzip with a github repo release zipfile
Summary: any release zipfile from a github repositiory will not work correctly by just piping the stream to unzip, e.g. as per example. fs.createReadStream('path/to/archive.zip').pipe(unzip.Extract({ path: 'output/path' }));
As tjfontaine demonstrated in the response to issue the signature has to be read from the stream first before piping stuff to unzip.
More background on the signature: https://users.cs.jmu.edu/buchhofp/forensics/formats/pkzip.html
Issue Analytics
- State:
- Created 10 years ago
- Comments:12
Top Results From Across the Web
How to Fix Unzip Error “End-of-central-directory signature not ...
Rarely, you may attempt to unzip a zip archive and come across an error that states “End-of-central-directory signature not found.
Read more >2 Methods to Fix the Zip File Error 'Missing End Signature'
The easiest way to fix the Zip File error: Missing end signature or invalid zip file, is by making use of Remo ZIP...
Read more >unzip error "End-of-central-directory signature not found"
Try this excellent solution: jar xvf COCR2_100.zip. steps: drag and drop file into terminal window. use keyboard arrows to navigate to start of...
Read more >How To Fix ZIP File with Missing End Signature Error? - Yodot
ZIP file error missing end signature implies that the ZIP archive is corrupt or that it is not a valid .zip file. When...
Read more >Reading a file signature and telling the difference between a ...
What I did was put the file signatures into a database, put the signature length of file type and the extension. If the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same issue. Switching to node-unzip-2 fixed it for me.
It sounds like the “block lengths” and “block types” errors might be separate issues.
I’m working with a 3.5 MB zip file. When I use the Mac OSX compression tool to create the zip (right click on a folder and click Compress), then run it through node-unzip, I get “invalid stored block lengths”. When I compress the same directory using the
zip
command line utility, then node-unzip extracts it just fine.Maybe the storage format has some variations that we’re not accounting for. I did a hex diff of the two files. I don’t know if it’s helpful to a keener eye than mine:
hex-diff.png