diff options
author | James M Snell <jasnell@gmail.com> | 2016-06-07 14:38:00 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-06-11 17:24:35 -0700 |
commit | 197a4652807bf1d830d67c1d8a4aecdf35fda6a4 (patch) | |
tree | f1066a00879074d5c3d6a03b85965f65251ae57a /test/parallel/test-zlib-params.js | |
parent | a173483619cc47999e5016e968ec807a55ccd53c (diff) | |
download | android-node-v8-197a4652807bf1d830d67c1d8a4aecdf35fda6a4.tar.gz android-node-v8-197a4652807bf1d830d67c1d8a4aecdf35fda6a4.tar.bz2 android-node-v8-197a4652807bf1d830d67c1d8a4aecdf35fda6a4.zip |
zlib: move constants into zlib.constants
zlib constants were previously being added to binding in node_zlib.cc.
This moves the zlib constants to node_constants.cc for consistency with
the recent constants refactoring:
https://github.com/nodejs/node/pull/6534
Adds require('zlib').constants to expose the constants
Docs-only deprecates the constants hung directly off require('zlib')
Removes a couple constants from the docs that apparently no longer
exist in the code
PR-URL: https://github.com/nodejs/node/pull/7203
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/parallel/test-zlib-params.js')
-rw-r--r-- | test/parallel/test-zlib-params.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-zlib-params.js b/test/parallel/test-zlib-params.js index eea47979e3..09c35ca599 100644 --- a/test/parallel/test-zlib-params.js +++ b/test/parallel/test-zlib-params.js @@ -7,7 +7,7 @@ var fs = require('fs'); const file = fs.readFileSync(path.resolve(common.fixturesDir, 'person.jpg')); const chunkSize = 12 * 1024; -const opts = { level: 9, strategy: zlib.Z_DEFAULT_STRATEGY }; +const opts = { level: 9, strategy: zlib.constants.Z_DEFAULT_STRATEGY }; const deflater = zlib.createDeflate(opts); const chunk1 = file.slice(0, chunkSize); @@ -17,7 +17,7 @@ const expected = Buffer.concat([blkhdr, chunk2]); let actual; deflater.write(chunk1, function() { - deflater.params(0, zlib.Z_DEFAULT_STRATEGY, function() { + deflater.params(0, zlib.constants.Z_DEFAULT_STRATEGY, function() { while (deflater.read()); deflater.end(chunk2, function() { var bufs = [], buf; |