Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/caio-ribeiro-pereira/gzipme
A simple way to gzip your files
https://github.com/caio-ribeiro-pereira/gzipme
cli gzip gzip-compression
Last synced: 3 months ago
JSON representation
A simple way to gzip your files
- Host: GitHub
- URL: https://github.com/caio-ribeiro-pereira/gzipme
- Owner: caio-ribeiro-pereira
- License: mit
- Created: 2013-05-31T12:17:39.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-03-05T11:24:08.000Z (almost 2 years ago)
- Last Synced: 2024-10-02T10:08:01.890Z (5 months ago)
- Topics: cli, gzip, gzip-compression
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/gzipme
- Size: 462 KB
- Stars: 33
- Watchers: 4
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nodejs-pure-js - gzipme
README
## Gzipme
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=L8MUNAKECUULY&source=url) [](https://travis-ci.org/caio-ribeiro-pereira/gzipme) [](https://www.codacy.com/manual/caio-ribeiro-pereira/gzipme?utm_source=github.com&utm_medium=referral&utm_content=caio-ribeiro-pereira/gzipme&utm_campaign=Badge_Grade) [](https://coveralls.io/github/caio-ribeiro-pereira/gzipme?branch=master)     
## About
A simple and tiny lib/cli for gzip file compression. It's very simple to use it, take a look:
### Instalation
``` bash
npm install gzipme
```## Module version
### How to use``` javascript
// 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](https://nodejs.org/api/zlib.html#zlib_zlib_constants) to understand the Node.js Zlib compreension mode.
## CLI version
### Instalation``` bash
npm install -g gzipme
```### All commands
``` bash
# 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:
``` bash
git clone [email protected]:caio-ribeiro-pereira/gzipme.git
cd gzipme
npm install
npm test
```## Author
Caio Ribeiro Pereira
Twitter:
About me: