glebdmitriew / node-unzip-2

node.js cross-platform unzip using streams
MIT License
44 stars 39 forks source link

Added ability to override zlib default options #7

Closed sampsasaarela closed 6 years ago

sampsasaarela commented 9 years ago

I added ability to override zlib default options with zlibOptions -parameter.

Example:

unzip.Parse({ zlibOptions : {
            flush: zlib.Z_FULL_FLUSH
}}

https://nodejs.org/api/zlib.html#zlib_zlib_inflateraw_buf_options_callback

I had to set flush to zlib.Z_FULL_FLUSH because with default option my unzip script failed for some reason, so I decided to create this fork. Please free to merge this.

kevinohara80 commented 9 years ago

+1

I like exposing the zlib configuration. It allows implementers to solve for edge-cases.