Needlessly Promiscuous, Modularize!

    teeny-tiny

    1.0.4 • Public • Published
    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

    Install

    npm i teeny-tiny

    DownloadsWeekly Downloads

    20

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    402 kB

    Total Files

    9

    Last publish

    Collaborators

    • pedreviljoen