How to use lzwcompress - 2 common examples

To help you get started, we’ve selected a few lzwcompress 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 graphsense / graphsense-dashboard / src / app.js View on Github external
compress (data) {
    return new Uint32Array(
      pack(
        // convert to base64 (utf-16 safe)
        Base64.encode(
          JSON.stringify(data)
        )
      )
    ).buffer
  }
  decompress (data) {
github graphsense / graphsense-dashboard / src / app.js View on Github external
decompress (data) {
    return JSON.parse(
      Base64.decode(
        unpack(
          [...new Uint32Array(data)]
        )
      )
    )
  }
  serialize () {

lzwcompress

Lossless LZW compression/decompression implemented in JavaScript for strings/JSON/JS objects.

MIT
Latest version published 4 years ago

Package Health Score

48 / 100
Full package analysis

Popular lzwcompress functions