LZ4 for browser
bower install lz4
html
<script src="bower_components/lz4/lz4.js"></script>npm install lz4-asm
npm install lz4-asm -g
lz4-asm -h
lz4.BLOCK_MAX_SIZE_64KBlz4.BLOCK_MAX_SIZE_256KBlz4.BLOCK_MAX_SIZE_1MBlz4.BLOCK_MAX_SIZE_4MB
compress to a lz4 buffer.
- source
Uint8Array | Buffer - options
- compressionLevel
number(range of0-16, default is0) - blockMaxSize
number(lz4.BLOCK_MAX_SIZE_XX, default islz4.BLOCK_MAX_SIZE_4MB) - blockIndependent
boolean(default is false) - contentChecksum
boolean(default is false)
- compressionLevel
- return
Uint8Array | Buffer
decompress a lz4 buffer.
- source
Uint8Array | Buffer - return
Uint8Array | Buffer
create a nodejs transform stream.
- options
- compressionLevel
number(range of0-16, default is0) - blockMaxSize
number(lz4.BLOCK_MAX_SIZE_XX, default islz4.BLOCK_MAX_SIZE_4MB) - blockIndependent
boolean(default is false) - contentChecksum
boolean(default is false)
- compressionLevel
create a nodejs transform stream.
- latest emscripten
- nodejs v5.0~
Clone the repo.
git clone https://github.com/ukyo/lz4.js.git
If you don't have grunt-cli installed, run the following.
npm install -g grunt-cli
Install the dev dependencies.
cd path/to/lz4.js
npm install
Download the original LZ4 repo and compile for development.
grunt init
Watch for code updates and run tests.
grunt watch
Release build.
grunt release