~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to third_party/lzma.js/README.markdown

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
lzma.js
 
3
=======
 
4
 
 
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
 
7
possible.
 
8
 
 
9
lzip is GPL, additional code is MIT
 
10
 
 
11
 
 
12
Building
 
13
--------
 
14
 
 
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.
 
19
 
 
20
 
 
21
Usage
 
22
-----
 
23
 
 
24
LZMA.compress(data) receives an array of 8-bit data and returns an
 
25
    array of compressed data.
 
26
 
 
27
LZMA.decompress(data) receives an array of compressed 8-bit data and
 
28
    returns an array of decompressed data.
 
29
 
 
30
 
 
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.
 
34
 
 
35
See test-decoder.js, test-full.js and test-full.html for example
 
36
uses.
 
37