1.0.4 • Published 5 years ago

teeny-tiny v1.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

teeny-tiny

Package version Make a pull request License npm downloads code style: prettier Greenkeeper badge

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!

  1. Fork it.
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Or open up a issue.

License

MIT

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago