I see this file has exports.LZW.compress and exports.LZW.decompress methods which are not prototypes? Ideally it should have been defined asexports.LZW.prototype.compress and exports.LZW.prototype.decompress ?
Also decompress won't return back the compressed data ?
var lzw = new LZW();
undefined
var compressed = lzw.compress("ABCABCABCABCABCABC");
undefined
compressed
(9) [65, 66, 67, 256, 258, 257, 259, 262, 257]
var decompress = lzw.decompress(compressed);
undefined
decompress
"ABCĀĂāăĆā"
I see this file has
exports.LZW.compress
andexports.LZW.decompress
methods which are not prototypes? Ideally it should have been defined asexports.LZW.prototype.compress
andexports.LZW.prototype.decompress
?Also decompress won't return back the compressed data ?