setasign\Fpdi\PdfParser\Filter

Lzw Class for handling LZW encoded data

File: /FPDI v2/PdfParser/Filter/Lzw.php

Class hierarchy

Implements

Summary

Properties

$andTable

protected array Lzw::$andTable = array(...)

$bitsToGet

protected int Lzw::$bitsToGet = 9

$bytePointer

protected int Lzw::$bytePointer

$data

protected null|string Lzw::$data

$dataLength

protected int Lzw::$dataLength = 0

$nextBits

protected int Lzw::$nextBits = 0

$nextData

protected int Lzw::$nextData = 0

$sTable

protected array Lzw::$sTable = array()

$tIdx

protected int Lzw::$tIdx

Methods

addStringToTable()

protected Lzw::addStringToTable (
string $oldString [, string $newString = '' ]
): void

Add a new string to the string table.

Parameters
$oldString : string
 
$newString : string
 

decode()

public Lzw::decode (
string $data
): string

Method to decode LZW compressed data.

Parameters
$data : string

The compressed data

Return Values

The uncompressed data

Exceptions

Throws LzwException

getNextCode()

protected Lzw::getNextCode (
void
): int

Returns the next 9, 10, 11 or 12 bits.

initsTable()

protected Lzw::initsTable (
void
): void

Initialize the string table.