var fs = require('fs');
var zlib = require('zlib');
fs.createReadStream('input.txt.gz')
.pipe(zlib.createGunzip())
.pipe(fs.createWriteStream('input3.txt'));
console.log('File Decompressed');
转载请注明:谷谷点程序 » node.js解压缩包的方法
var fs = require('fs');
var zlib = require('zlib');
fs.createReadStream('input.txt.gz')
.pipe(zlib.createGunzip())
.pipe(fs.createWriteStream('input3.txt'));
console.log('File Decompressed');
转载请注明:谷谷点程序 » node.js解压缩包的方法