Package Exports
- gzipme
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gzipme) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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 gzipmeModule version
How to use
// Load gzipme module
const gzipme = require('gzipme');
// Compress 'file.txt' to 'file.txt.gz' in the same dir.
gzipme('file.txt');
// Compress 'file.txt' into the same file.
gzipme('file.txt', { overwrite: true });
// Compress 'file.txt' to generate a file named as 'compressed.txt' in the same dir.
gzipme('file.txt', { output: 'compressed.txt' });
// Compress 'file.txt' using best compress mode (few bytes, but slow compression).
gzipme('file.txt', { mode: 'best' });
// Compress 'file.txt' using fast compress mode (fast compression, but more bytes).
gzipme('file.txt', { mode: 'fast' });Click here to understand the Node.js Zlib compreension mode.
CLI version
Instalation
npm install -g gzipmeAll 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.txtRunning tests
Just clone this repository, and follow the commands below:
git clone git@github.com:caio-ribeiro-pereira/gzipme.git
cd gzipme
npm install
npm testAuthor
Caio Ribeiro Pereira caio.ribeiro.pereira@gmail.com
Twitter: http://twitter.com/crp_underground
About me: https://crpwebdev.github.io