aboutsummaryrefslogtreecommitdiff
path: root/third_party/lzma.js/README.markdown
blob: e2c907300764fd0473592d171178232262f89894 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
lzma.js
=======

An LZMA implementation in JavaScript, compiled from lzip using Emscripten
with the goal of having a small and fast implementation as much as
possible.

lzip is GPL, additional code is MIT


Building
--------

Run doit.sh. It will build both a native build, lzma-native, and lzma.js.
Both are useful because you can use the native build to compress locally,
and the JS build to decompress on the client browser. But, you can use
whichever you want in either location.


Usage
-----

LZMA.compress(data) receives an array of 8-bit data and returns an
    array of compressed data.

LZMA.decompress(data) receives an array of compressed 8-bit data and
    returns an array of decompressed data.


Use lzma-decoder.js if you just need to decode. It's 66K, or 23K
if your webserver does gzip. If you need compression too, use
lzma-full.js which is a little larger.

See test-decoder.js, test-full.js and test-full.html for example
uses.