Is it feasible to implement a lz4 decompressor in JavaScript?

I don't have much knowledge about compressors but we have a requirement in our application to compress the JavaScript code beforehand and decompress the code at runtime (self-extracting JavaScript). Lz4hc looks ideal for our requirements considering it's decompression
speeds. but I couldn't find any decoders for Lz4/Lz4hc written in JavaScript. So I am planing to write one and have following queries.

Is it possible to implement a Lz4 decoder in JavaScript?

If possible what are the considerations I need to take into account ?

It is a phone application.

Script file size is 1.5 - 4 mb after minifying with yuicompressor.

Encoding ?? base64/utf-16/latin-1 (this is where I am not getting it).

If not possible, are there any alternatives

I already tried other tools like
Packer and CrunchMe which generates a self-extractable compressed JavaScript code. But the code extracted by both of them are causing some JavaScript syntax exception which is nearly impossible
to debug considering the script size.

Please note, though, LZ4Stream which I've implemented is not compatible with node-lz4 stream. So you are limited to "synchronous" mode of node-lz4 (it does not stream it just encodes/decodes whole blocks).