Documentation

Lzw
in package
implements FilterInterface

Pdf extract lzw filter class

Tags
category

Pop

author

Nick Sagona, III nick@popphp.org

copyright

Copyright (c) 2009-2026 Nick Sagona, III

license

https://www.popphp.org/license New BSD License

version
6.0.0

Table of Contents

Interfaces

FilterInterface
Pdf extract filter interface

Constants

CLEAR  = 256
LZW clear-table code
EOD  = 257
LZW end-of-data code
MAX_DECODED_LENGTH  = 67108864
Maximum decoded stream size in bytes

Methods

decode()  : string
Decode an LZWDecode stream
initialTable()  : array<string|int, mixed>
Build the initial 256-entry single-byte LZW table
readCode()  : int|null
Read the next fixed-width code from the bitstream

Constants

CLEAR

LZW clear-table code

protected mixed CLEAR = 256

EOD

LZW end-of-data code

protected mixed EOD = 257

MAX_DECODED_LENGTH

Maximum decoded stream size in bytes

protected mixed MAX_DECODED_LENGTH = 67108864

Methods

decode()

Decode an LZWDecode stream

public decode(string $data[, array<string|int, mixed> $params = [] ]) : string
Parameters
$data : string
$params : array<string|int, mixed> = []
Tags
throws
Exception
Return values
string

initialTable()

Build the initial 256-entry single-byte LZW table

protected initialTable() : array<string|int, mixed>
Return values
array<string|int, mixed>

readCode()

Read the next fixed-width code from the bitstream

protected readCode(string $data, int $bytes, int &$bitPos, int $codeWidth) : int|null
Parameters
$data : string
$bytes : int
$bitPos : int
$codeWidth : int
Return values
int|null

        
On this page

Search results