A WASM-based LZW decoder for tiff images. Uses weezl, a
purely safe and dependency-less Rust crate providing LZW decoding.
The full bundle size is 15kb.
npm install @developmentseed/lzw-tiff-decoderimport { decompress } from '@developmentseed/lzw-tiff-decoder';
const compressedBytes = new Uint8Array(/* tile or strip from tiff */);
const maxUncompressedSize = tileWidth * tileHeight * bitsPerSample / 8;
const decoded = await decompress(compressedBytes, maxUncompressedSize);npm install
npm run buildnpm publish