How to use the lzutf8.decompressAsync 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 velopert / bitimulate / bitimulate-frontend / src / lib / socket.js View on Github external
return new Promise((resolve, reject) => {
    LZUTF8.decompressAsync(data, {
      inputEncoding: 'BinaryString'
    }, (result, error) => {
      if(error) reject(error);
      resolve(result);
    })
  })
}
github lifion / lifion-kinesis / lib / compression.js View on Github external
new Promise((resolve, reject) => {
        const options = { inputEncoding, useWebWorker: false };
        decompressAsync(input, options, (output, err) => {
          if (!err) resolve(output);
          else reject(err);
        });
      })
  }
github TheBastionBot / Bastion / functions / decodeString.js View on Github external
return new Promise((resolve, reject) => {
    let options = {
      inputEncoding: 'StorageBinaryString'
    };

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

    lzutf8.decompressAsync(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