mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
487 B
19 lines
487 B
9 years ago
|
'use strict';
|
||
|
// Test unzipping a gzip file that contains multiple concatenated "members"
|
||
|
|
||
|
const common = require('../common');
|
||
|
const assert = require('assert');
|
||
|
const zlib = require('zlib');
|
||
|
|
||
|
const data = Buffer.concat([
|
||
|
zlib.gzipSync('abc'),
|
||
|
zlib.gzipSync('def')
|
||
|
]);
|
||
|
|
||
|
assert.equal(zlib.gunzipSync(data).toString(), 'abcdef');
|
||
|
|
||
|
zlib.gunzip(data, common.mustCall((err, result) => {
|
||
|
assert.ifError(err);
|
||
|
assert.equal(result, 'abcdef', 'result should match original string');
|
||
|
}));
|