mirror of
https://github.com/nodejs/node.git
synced 2026-12-04 02:19:15 -05:00
test: smaller chunk size for smaller person.jpg
PR-URL: https://github.com/nodejs/node/pull/5813 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Conflicts: test/parallel/test-zlib-params.js
This commit is contained in:
1 parent
f95fc175eb
commit
ca971b0d77
1 file changed
+2
-2
@@ -6,13 +6,13 @@ var path = require('path');
|
||||
var fs = require('fs');
|
||||
|
||||
const file = fs.readFileSync(path.resolve(common.fixturesDir, 'person.jpg'));
|
||||
const chunkSize = 24 * 1024;
|
||||
const chunkSize = 12 * 1024;
|
||||
const opts = { level: 9, strategy: zlib.Z_DEFAULT_STRATEGY };
|
||||
const deflater = zlib.createDeflate(opts);
|
||||
|
||||
const chunk1 = file.slice(0, chunkSize);
|
||||
const chunk2 = file.slice(chunkSize);
|
||||
const blkhdr = new Buffer([0x00, 0x48, 0x82, 0xb7, 0x7d]);
|
||||
const blkhdr = new Buffer([0x00, 0x5a, 0x82, 0xa5, 0x7d]);
|
||||
const expected = Buffer.concat([blkhdr, chunk2]);
|
||||
let actual;
|
||||
|
||||
|
||||
Reference in new issue
Block a user