LZ-based compression algorithm for JavaScript