Creates an LZW filter for encoding and decoding PDF stream data. LZW (Lempel-Ziv-Welch) is a lossless compression algorithm. This is a minimal implementation for PDF (12-bit, no early change, no predictor).
A PdfFilter object with encode and decode methods.
const filter = lzw()const compressed = filter.encode(rawData)const decompressed = filter.decode(compressed) Copy
const filter = lzw()const compressed = filter.encode(rawData)const decompressed = filter.decode(compressed)
Creates an LZW filter for encoding and decoding PDF stream data. LZW (Lempel-Ziv-Welch) is a lossless compression algorithm. This is a minimal implementation for PDF (12-bit, no early change, no predictor).