kevva / decompress-unzip

zip plugin for decompress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No Stream Support?

CodeMan99 opened this issue · comments

Of the default decompress plugins, this seems to be the only one that doesn't seem to support streamed input.

Is there a particular reason why streaming is not supported for unzip? There is already a dependency on get-stream, so it seems reasonable to just put that in front of the yauzl call.

Yes, I've explained why in kevva/decompress#29 (comment). Until we've a better alternative to yauzl, I think we're stuck with the Promise API.

Ok. So just for the sake of future readers. You are saying that you agree with the author of yauzl and that the library shouldn't buffer the stream contents?

I'd like for this module to support streams, but since yauzl doesn't, and since it's the best alternative out there currently, I don't see how we can accomplish it right now.

I don't see how we can accomplish it right now.

You mean without using getStream.buffer?

I mean, if you are ok with buffering internally in the plugin, it would be very easy to do.

It's not super pure, but sure, we could do it. PR welcome.

@kevva Closing this again as the PR is now closed.

Apparently I changed my mind since. But yeah, not a big fan of supporting it if we're going to buffer it anyway.