Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
Lzw Class Reference

Class for handling LZW encoded data. More...

Inheritance diagram for Lzw:
FilterInterface

Public Member Functions

 decode ($data)
 Method to decode LZW compressed data.
 

Protected Member Functions

 addStringToTable ($oldString, $newString='')
 Add a new string to the string table.
 
 getNextCode ()
 Returns the next 9, 10, 11 or 12 bits.
 
 initsTable ()
 Initialize the string table.
 

Protected Attributes

array $andTable = [511, 1023, 2047, 4095]
 
int $bitsToGet = 9
 
int $bytePointer
 
null string $data
 
int $dataLength = 0
 
int $nextBits = 0
 
int $nextData = 0
 
array $sTable = []
 
int $tIdx
 

Detailed Description

Class for handling LZW encoded data.

Member Function Documentation

◆ addStringToTable()

Lzw::addStringToTable ( $oldString,
$newString = '' )
protected

Add a new string to the string table.

Parameters
string$oldString
string$newString

◆ decode()

Lzw::decode ( $data)

Method to decode LZW compressed data.

Parameters
string$dataThe compressed data
Return values
stringThe uncompressed data
Exceptions
LzwException

Implements FilterInterface.

◆ getNextCode()

Lzw::getNextCode ( )
protected

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

Return values
int

The documentation for this class was generated from the following file: