A basic GZip compress and decompress library
You can install the latest version of the package using npm:
$ npm install --save gzipy
//Import gzipy
var gzipy = require('gzipy');
//Compress a file
gzipy.compress('./file.txt', './file.txt.gz', function(error)
{
//Handle the error
if(error){ /* Something went wrong... */ }
console.log('File compressed!');
});
//Decompress a file
gzipy.decompress('./document.pdf.gz', './document.pdf', function(error)
{
//Handle the error
if(error){ /* Something went wrong... */ }
console.log('File decompressed');
});
Compress the input
file and save it to output
. The callback method will be called when the process is completed or when there is an error.
Decompress the input
file and save it to output
. The callback method will be called when the process is completed or when there is an error.
Under the MIT LICENSE.