The purpose of this library is to implement LZ4 compression/decompression, as documented at the official LZ4 repository:
The files in this directory are developed as a separate project at:
The script for either instance are dynamically loaded and only when needed, such that no resources are wasted by keeping in memory code which won't be used.
This contains the code to instanciate WebAssembly-based LZ4 block codec. Note
that the WebAssembly module is loaded using a
same-origin fetch, hence
ensuring that no code outside the package is loaded.
This is used as a fallback implementation should WebAssembly not be available for whatever reason.
This is the WebAssembly module, loaded by
lz4-block-codec-wasm.js using a
The WebAssembly source code used to generate the WebAssembly module
wat2wasm ./lz4-block-codec.wat -o ./lz4-block-codec.wasm wasm-opt ./lz4-block-codec.wasm -O4 -o ./lz4-block-codec.wasm