Skip to content

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

License

Notifications You must be signed in to change notification settings

eAi/lzwCompress.js

 
 

Repository files navigation

npm Travis Coverage Status David Build Status codecov

Build Status FOSSA Status

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

Usage:

Node

Install lzwCompress from npm:

npm install lzwcompress

And then to use it in your node.js applications:

var lzwCompress = require('lzwcompress');

...

// To compress anything from within JS
var compressed = lzwCompress.pack(humongousObj);

...

// And to decompress it
var original = lzwCompress.unpack(compressed);

Browser

Install lzwCompress from npm:

bower install --save lzwcompress

Then include lzwCompress.js using a script tag in your HTML:

<script src="lzwCompress.js"></script>

And then use it in your browser applications:

var lzwCompress = window.lzwCompress;

...

// To compress anything from within JS
var compressed = lzwCompress.pack(humongousObj);

...

// And to decompress it
var original = lzwCompress.unpack(compressed);

Applies LZW compression and JSON key optimization and makes JSON (or any javascript object) smaller for local storage, to ship up to the server etc.

License

MIT License

FOSSA Status

Other Libraries

For use in Angular 1.X projects, check out the angular-lzwcompress module

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%