teeny-tiny

Compression and decompression. Simple & lightweight

Usage no npm install needed!

<script type="module">
  import teenyTiny from 'https://cdn.skypack.dev/teeny-tiny';
</script>

README

Compression

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