tiff
Version:
TIFF image decoder written entirely in JavaScript
17 lines (14 loc) • 371 B
text/typescript
import { decompressSync } from 'fflate';
export function decompressZlib(stripData: DataView): DataView {
const stripUint8 = new Uint8Array(
stripData.buffer,
stripData.byteOffset,
stripData.byteLength,
);
const inflated = decompressSync(stripUint8);
return new DataView(
inflated.buffer,
inflated.byteOffset,
inflated.byteLength,
);
}