Node.js zlib decompress gzip/gz file

Description

Node.js zlib decompress gzip/gz file


var fs = require("fs");
var zlib = require('zlib');

fs.createReadStream('input.txt.gz')
  .pipe(zlib.createGunzip())/*from www .  j  av  a  2s  . com*/
  .pipe(fs.createWriteStream('input.txt'));

console.log("over");



PreviousNext

Related