ZJONSSON / node-unzipper

node.js cross-platform unzip using streams
Other
424 stars 114 forks source link

Access the raw compressed data of an entry #323

Closed giniedp closed 2 weeks ago

giniedp commented 3 weeks ago

Is there currently any way to access the raw uncompressed data of an entry?

The use case is to be able to uncompress with non standard methods or other libraries e.g. oodle.

ZJONSSON commented 2 weeks ago

Yes it should be possible with the Open methods. For each entry, you must manually set compressionMethod to null or undefined and then call the stream method to get a stream of the raw uncompressed data.

By setting compressionMethod to falsy, you would essentially be instructing the resulting stream to be a passthrough: https://github.com/ZJONSSON/node-unzipper/blob/master/lib/Open/unzip.js#L83

Please reopen the issue if you have problems