If you want to process it one chunk at a time (which is probably best)
use a zlib.Unzip() object rather than the convenience method.
var unzipper = zlib.Unzip()
req.on("data", function (c) {
unzipper.write(c)
})
req.on("end", function () {
unzipper.end()
})
unzipper.on("data", function (c) {
// some unzipped data
})
unzipper.on("end", function () {
// no more unzipped data is coming
})
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
var unzipper = new zlib.Unzip()
(Though, the function detects this and does the right thing anyway.)