Git Product home page Git Product logo

Comments (18)

RonWang avatar RonWang commented on July 16, 2024 4

Data point: also still hangs on some files...

from node-unzip.

lazdmx avatar lazdmx commented on July 16, 2024 1

Still hangs on some files...

from node-unzip.

EvanOxfeld avatar EvanOxfeld commented on July 16, 2024

In Node v0.9.6 CPU usage stays under 10%. Unfortunately unzip still hangs after writing AUTHORS.txt from the jquery zip.

from node-unzip.

satazor avatar satazor commented on July 16, 2024

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.

from node-unzip.

EvanOxfeld avatar EvanOxfeld commented on July 16, 2024

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.

from node-unzip.

satazor avatar satazor commented on July 16, 2024

Hmm does it still conform to the Zip spec or is it an invalid zip per say?

from node-unzip.

EvanOxfeld avatar EvanOxfeld commented on July 16, 2024

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.

from node-unzip.

satazor avatar satazor commented on July 16, 2024

Alright, looking forward to the fix!

from node-unzip.

EvanOxfeld avatar EvanOxfeld commented on July 16, 2024

I have a fix that still needs cleanup. I'm targeting getting it published to npm tonight.

from node-unzip.

ralphholzmann avatar ralphholzmann commented on July 16, 2024

Thanks for the work on this @EvanOxfeld!

from node-unzip.

anacronw avatar anacronw commented on July 16, 2024

thanks!

from node-unzip.

EvanOxfeld avatar EvanOxfeld commented on July 16, 2024

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.

from node-unzip.

EvanOxfeld avatar EvanOxfeld commented on July 16, 2024

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.

from node-unzip.

satazor avatar satazor commented on July 16, 2024

@EvanOxfeld I'm not getting the end or error event when extracting. :(

from node-unzip.

satazor avatar satazor commented on July 16, 2024

In 0.0.4:

  writer.on('close', function() {
    self.emit("end");
    self.emit("close");
  });

In 0.1.x end was removed. Was this intentional?

from node-unzip.

EvanOxfeld avatar EvanOxfeld commented on July 16, 2024

@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.

from node-unzip.

satazor avatar satazor commented on July 16, 2024

Alright, thank you!

from node-unzip.

amakhrov avatar amakhrov commented on July 16, 2024

Still hangs on some files (xlsx files produced by MS Office) :
https://dl.dropboxusercontent.com/u/39725868/xlsx.zip

It starts reading the file - 'entry' callback triggers a couple of times. And then hangs, producing 100% cpu load.
Strange enough that the old 0.0.4 version parses this file well.

Thanks

from node-unzip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.