RunLength

RunLengthDecode filter (PDF 32000-1:2008 §7.4.5). Decompresses byte-oriented run-length encoded data.

Table of contents

Namespace: Com\Tecnick\Pdf\Filter\Type

Implements: Template

File: RunLength.php line 41

RunLengthDecode filter (PDF 32000-1:2008 §7.4.5). Decompresses byte-oriented run-length encoded data.

A truncated stream is not an error: a missing EOD marker (128), a run marker with no byte after it, and a literal run reaching past the end of the data all end the decode and return the bytes recovered so far.

Tags

Methods

decode()

File: RunLength.php line 54

public decode(string $data[, array<string, mixed> $params = [] ]) : string

Parameters

  • $data : string: Data to decode.
  • $params : array<string, mixed> = []: Optional DecodeParms dictionary. - ‘MaxOutputSize’ (int): decoded-size cap in bytes; 0 (default) = unlimited.

Tags

Return values

string —

Decoded data.