node-core has built in zip features: http://nodejs.org/api/zlib.html
Use them:
var zlib = require('zlib');
var gzip = zlib.createGzip();
var fs = require('fs');
var inp = fs.createReadStream('input.txt');
var out = fs.createWriteStream('input.txt.gz');
inp.pipe(gzip).pipe(out);
More Related Contents:
- Simplest way to download and unzip files in Node.js cross-platform?
- Need to ZIP an entire directory using Node.js
- Using Node.js as a simple web server
- Stop Mongoose from creating _id property for sub-document array items
- Execute Powershell script from Node.js
- Order of router precedence in express.js
- When is the thread pool used?
- How to change bower’s default components folder?
- How to modify the nodejs request default timeout time?
- How do I prevent node.js from crashing? try-catch doesn’t work
- What exactly is a Node.js event loop tick?
- NodeJS base64 image encoding/decoding not quite working
- Get file name from absolute path in Nodejs?
- node.js itself or nginx frontend for serving static files?
- How to consume npm modules from typescript?
- Mongoose update without callback
- Firebase deploy errors starting with non-zero exit code (space in project path)
- What is non-blocking or asynchronous I/O in Node.js?
- How to define object in array in Mongoose schema correctly with 2d geo index
- Express.js req.ip is returning ::ffff:127.0.0.1
- What is best way to handle global connection of Mongodb in NodeJs
- Call a “local” function within module.exports from another function in module.exports?
- Is there any way to fix package-lock.json lockfileVersion so npm uses a specific format?
- “Cannot use import statement outside a module” with Axios
- Module request how to properly retrieve accented characters? � � �
- How to include external .js file to ejs Node template page
- How can I get Express.js to 404 only on missing routes?
- How to wait for a child process to finish in Node.js
- Unable to Change Favicon with Express.js
- Firebase realtime database transaction handler gets called twice most of the time