README
teeny-tiny
Simple compression and decompression
Contents
Install
yarn add teeny-tiny
OR
npm install teeny-tiny
Usage
Require the compress & decompress functions from the module
const { compress, decompress } = require('teeny-tiny')
Compress or Decompress, returns a promise:
async function start (){
const opts = true // will compress with best compression
// if false with best speed
const compressResult = await compress('Hello World', opts)
console.log(`[LOG]: ${compressResult}`) // prints: [LOG]: x��H����/�I
const decompressResult = await decompress(compressResult)
console.log(`[LOG]: ${decompressResult}`) // prints: [LOG]: Hello World
}
start()
Contribute
Contributions are welcome!
- Fork it.
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Or open up a issue.
License
MIT