lzwcompress

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

lzwCompress.js

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

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);

Include lzwCompress.js as a script tag:

<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.

MIT License

Just so I could earn some bragging rights, please endorse me on coderwall!