A WASM-based LZW decoder for tiff images. Uses weezl
, a
purely safe and dependency-less Rust crate providing LZW decoding.
$ npm install lzw-tiff-decoder
import { decompress } from 'lzw-tiff-decoder';
const compressedBytes = new Uint8Array(/* tile or strip from tiff */);
const maxUncompressedSize = tileWidth * tileHeight * bitsPerSample / 8;
const decoded = await decompress(compressedBytes, maxUncompressedSize);
$ cd js && npm install
$ npm run build