[node] homogenize zlib input to Buffer or string and results to Buffer

This commit is contained in:
Marc Ghorayeb
2017-08-15 14:36:40 +02:00
parent d4f42ab007
commit ad093c1036
9 changed files with 132 additions and 68 deletions
+16
View File
@@ -2820,3 +2820,19 @@ namespace async_hooks_tests {
const tId: number = async_hooks.triggerAsyncId();
const eId: number = async_hooks.executionAsyncId();
}
////////////////////////////////////////////////////
/// zlib tests : http://nodejs.org/api/zlib.html ///
////////////////////////////////////////////////////
namespace zlib_tests {
{
const gzipped = zlib.gzipSync('test');
const unzipped = zlib.gunzipSync(gzipped.toString());
}
{
const deflate = zlib.deflateSync('test');
const inflate = zlib.inflateSync(deflate.toString());
}
}