emscripten/third_party/lzma.js
Jukka Jylänki ba1d21daa8 Fix test browser.test_sdl_image_compressed on Windows when the system does not have Cygwin make, but does have MinGW32 make. 2013-11-17 22:06:01 +02:00
..
lzip Adding texEnv emulation to Immediate mode. 2013-05-20 10:48:40 -07:00
README.markdown add lzma.js in thirdparty 2012-03-16 11:10:10 -07:00
doit.bat Fix test browser.test_sdl_image_compressed on Windows when the system does not have Cygwin make, but does have MinGW32 make. 2013-11-17 22:06:01 +02:00
doit.sh [thirdparty/lzma.js]: Fixed doit.sh so that it compiles on Windows using MingW's GCC & Bash ; 2013-11-06 18:47:26 +08:00
lzma-decoder.js update lzma.js 2012-03-19 14:35:16 -07:00
lzma-full.js updated lzma.js 2012-03-16 12:18:45 -07:00
native_test.sh add lzma.js in thirdparty 2012-03-16 11:10:10 -07:00
post.js add lzma.js in thirdparty 2012-03-16 11:10:10 -07:00
pre.js add lzma.js in thirdparty 2012-03-16 11:10:10 -07:00
test-decoder.js add lzma.js in thirdparty 2012-03-16 11:10:10 -07:00
test-full.html add lzma.js in thirdparty 2012-03-16 11:10:10 -07:00
test-full.js add lzma.js in thirdparty 2012-03-16 11:10:10 -07:00

README.markdown

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.