feature(rest) add unzip

This commit is contained in:
coderaiser 2014-03-25 04:05:13 -04:00
parent 83aa10660c
commit 41654e09d3
12 changed files with 66 additions and 4 deletions

View file

@ -52,8 +52,12 @@
Util.exec(p.callback, error);
};
if (p.gzip) {
gzip = zlib.createGzip();
if (p.gzip || p.gunzip) {
if (p.gzip)
gzip = zlib.createGzip();
else
gzip = zlib.createGunzip();
read.on('error', onError);
read = read.pipe(gzip);
}