LzwFilter

LZW (Lempel-Ziv-Welch) decoder for PDF LZWDecode filter (ISO 32000-1 §7.4.4).

Variable-width codes, 9 to 12 bits, MSB-first packing. Code table grows incrementally as patterns are emitted. Codes 256 = CLEAR (reset table), 257 = EOD (end-of-data).

Supports the optional /EarlyChange parameter (0 = grow at code-width boundary the standard way; 1 = grow one code earlier, the default per spec). Also wraps the TIFF/PNG predictor pass for image streams.

Properties

Link copied to clipboard
open override val name: String

Functions

Link copied to clipboard
open override fun decode(input: ByteArray, params: PdfDictionary?): ByteArray