Table of contents
Namespace: Com\Tecnick\Pdf\Filter\Type
Implements: Template
File: Lzw.php line 38
LZWDecode filter (PDF 32000-1:2008 §7.4.4). Decompresses LZW (Lempel-Ziv-Welch) data and reverses the optional predictor.
Tags
- since: 2011-05-23
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2011-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-pdf-filter
Methods
decode()
File: Lzw.php line 63
public decode(string $data[, array<string, mixed> $params = [] ]) : string
Parameters
- $data : string: Data to decode.
- $params : array<string, mixed> = []: Optional DecodeParms dictionary. - ‘EarlyChange’ (int): 1 (default) increases the code length one code early; 0 disables it. - ‘MaxOutputSize’ (int): decoded-size cap in bytes; 0 (default) = unlimited. - ‘Predictor’, ‘Colors’, ‘BitsPerComponent’, ‘Columns’: see Predictor.
Tags
- throws: Exception
Return values
string —
Decoded data.