Skip to content

Commit

Permalink
test: smaller chunk size for smaller person.jpg
Browse files Browse the repository at this point in the history
PR-URL: #5813
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rod Vagg <[email protected]>

Conflicts:
	test/parallel/test-zlib-params.js
  • Loading branch information
kapouer authored and Fishrock123 committed Mar 22, 2016
1 parent f95fc17 commit ca971b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-zlib-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ca971b0

Please sign in to comment.