0.2.2 • Published 6 months ago
@developmentseed/lzw-tiff-decoder
Licence
MIT
Version
0.2.2
Deps
0
Size
18 kB
Vulns
0
Weekly
0
lzw-tiff-decoder
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.
Installation
npm install @developmentseed/lzw-tiff-decoder
Usage
import { 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);
Development
npm install
npm run build
Publish
npm publish