Compression by LZ algorithm in JavaScript.