Gzipme
About
A simple and tiny lib/cli for gzip file compression. It's very simple to use it, take a look:
Instalation
npm install gzipme
Module version
How to use
// Load gzipme moduleconst gzipme = ;// Compress 'file.txt' to 'file.txt.gz' in the same dir.;// Compress 'file.txt' into the same file.;// Compress 'file.txt' to generate a file named as 'compressed.txt' in the same dir.;// Compress 'file.txt' using best compress mode (few bytes, but slow compression).;// Compress 'file.txt' using fast compress mode (fast compression, but more bytes).;
Click here to understand the Node.js Zlib compreension mode.
CLI version
Instalation
npm install -g gzipme
All commands
# It's the same as function 'gzipme('file.txt')'.gzipme file.txt# It's the same as function 'gzipme('file.txt', { overwrite: true });'.gzipme -o file.txt# It's the same as function 'gzipme('file.txt', { output: 'compressed.txt' });'.gzipme -O compressed.txt file.txt# It's the same as function 'gzipme('file.txt', { mode: 'fast' });'.gzipme -c best file.txt# It's the same as function 'gzipme('file.txt', { mode: 'fast' });'.gzipme -c fast file.txt
Running tests
Just clone this repository, and follow the commands below:
git clone [email protected]:caio-ribeiro-pereira/gzipme.gitcd gzipmenpm installnpm test
Author
Caio Ribeiro Pereira [email protected]
Twitter: http://twitter.com/crp_underground
About me: https://crpwebdev.github.io