5
An LZMA implementation in JavaScript, compiled from lzip using Emscripten
6
with the goal of having a small and fast implementation as much as
9
lzip is GPL, additional code is MIT
15
Run doit.sh. It will build both a native build, lzma-native, and lzma.js.
16
Both are useful because you can use the native build to compress locally,
17
and the JS build to decompress on the client browser. But, you can use
18
whichever you want in either location.
24
LZMA.compress(data) receives an array of 8-bit data and returns an
25
array of compressed data.
27
LZMA.decompress(data) receives an array of compressed 8-bit data and
28
returns an array of decompressed data.
31
Use lzma-decoder.js if you just need to decode. It's 66K, or 23K
32
if your webserver does gzip. If you need compression too, use
33
lzma-full.js which is a little larger.
35
See test-decoder.js, test-full.js and test-full.html for example