'use strict';
var zlib = require('zlib');
var fs = require('fs');
var gzip = zlib.createGzip();
var inp = fs.createReadStream('some.html');
var out = fs.createWriteStream('some.html.gz');
inp.pipe(gzip).pipe(out);
Created
August 18, 2016 08:08
-
-
Save umidjons/6b64e6445a0e0a8f4b2124ce85beb894 to your computer and use it in GitHub Desktop.
Compressing file using the zlib module
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment