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 setasign\Fpdi\PdfParser\Filter\Lzw::$andTable = array(...)

$bitsToGet

protected int setasign\Fpdi\PdfParser\Filter\Lzw::$bitsToGet = 9

$bytePointer

protected int setasign\Fpdi\PdfParser\Filter\Lzw::$bytePointer

$data

protected null|string setasign\Fpdi\PdfParser\Filter\Lzw::$data

$dataLength

protected int setasign\Fpdi\PdfParser\Filter\Lzw::$dataLength = 0

$nextBits

protected int setasign\Fpdi\PdfParser\Filter\Lzw::$nextBits = 0

$nextData

protected int setasign\Fpdi\PdfParser\Filter\Lzw::$nextData = 0

$sTable

protected array setasign\Fpdi\PdfParser\Filter\Lzw::$sTable = array()

$tIdx

protected int setasign\Fpdi\PdfParser\Filter\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
): integer

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

initsTable()

protected Lzw::initsTable (
void
): void

Initialize the string table.