How to use the lzutf8.compressAsync function in lzutf8

To help you get started, we’ve selected a few lzutf8 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lifion / lifion-kinesis / lib / compression.js View on Github external
new Promise((resolve, reject) => {
        const options = { outputEncoding, useWebWorker: false };
        compressAsync(input, options, (output, err) => {
          if (!err) resolve(output);
          else reject(err);
        });
      }),
    /**
github TheBastionBot / Bastion / functions / encodeString.js View on Github external
return new Promise((resolve, reject) => {
    let options = {
      outputEncoding: 'StorageBinaryString'
    };

    let callback = function (data, error) {
      if (error) {
        reject(error);
      }
      resolve(data);
    };

    lzutf8.compressAsync(string, options, callback);
  });
};

lzutf8

A high-performance string compression library

MIT
Latest version published 2 years ago

Package Health Score

50 / 100
Full package analysis