-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hangs on some zip files #10
Comments
In Node v0.9.6 CPU usage stays under 10%. Unfortunately unzip still hangs after writing AUTHORS.txt from the jquery zip. |
Yes, in node v0.8.1.18 it also extracts AUTHORS.txt, though the CPU usage seems to be higher than the v0.9.8. |
I've tracked down the problem and am working on a fix for unzip to support more zip formats. Right now unzip only handles zip files that store the compressed / uncompressed file size in the local file header immediately prior to a given file's data. The example jquery zip file stores the compressed and uncompressed file size values after the compressed data rather than in the local file headers. |
Hmm does it still conform to the Zip spec or is it an invalid zip per say? |
It definitely conforms; the Zip spec is just wacky. There's a bit in the file header to signify whether or not the file size will be known at the start of inflation versus following. |
Alright, looking forward to the fix! |
I have a fix that still needs cleanup. I'm targeting getting it published to npm tonight. |
Thanks for the work on this @EvanOxfeld! |
thanks! |
This improvement is in unzip 0.1.3 and works in both Node 0.8 and 0.9. Unzip 0.1.3 should land in NPM shortly if it isn't there already. In the meantime, please let me know if you run into any issues. |
If you installed unzip 0.1.3 from NPM within the last five hours, please delete it and install it again. You received a much larger archive than you should have - see #11. |
@EvanOxfeld I'm not getting the |
In 0.0.4: writer.on('close', function() {
self.emit("end");
self.emit("close");
}); In 0.1.x |
@satazor Checking the unzip.Extract stream for the 'close' event is correct. I removed unzip.Extract's 'end' event intentionally to conform to the Writable Stream spec. My understanding is that only streams that are readable should emit 'end' whereas streams that are writable should emit 'finish' and may emit 'close'. Sorry for the confusion I probably caused, but I'm glad the issue has been resolved in Bower. |
Alright, thank you! |
Still hangs on some files (xlsx files produced by MS Office) : It starts reading the file - 'entry' callback triggers a couple of times. And then hangs, producing 100% cpu load. Thanks |
Still hangs on some files... |
Data point: also still hangs on some files... |
Here's an example: http://jqueryui.com/resources/download/jquery-ui-1.10.0.custom.zip
CPU is at 100%.
Please note that in older versions, it was giving me signature error. But after upgrading, I'm getting this behaviour.
This bug has been reported in twitter/bower: bower/bower#225
I dunno if this is related to #8, probably is.
The text was updated successfully, but these errors were encountered: