pssht  latest
SSH server library written in PHP
fpoirotte\Pssht\Compression\Zlib Class Reference
+ Inheritance diagram for fpoirotte\Pssht\Compression\Zlib:

Public Member Functions

 __construct ($mode)
 
 getMode ()
 
 update ($data)
 

Static Public Member Functions

static getName ()
 Return the name of the algorithm.
 
static isAvailable ()
 

Protected Attributes

 $mode
 Compression/decompression mode.
 
 $stream
 Compression/decompression stream.
 

Static Protected Attributes

static $deflateFactory
 Factory used to deflate (compress) data.
 
static $inflateFactory
 Factory used to inflate (decompress) data.
 

Additional Inherited Members

- Public Attributes inherited from fpoirotte\Pssht\Compression\CompressionInterface
const MODE_COMPRESS = 0
 Use the algorithm for compression.
 
const MODE_UNCOMPRESS = 1
 Use the algorithm for decompression.
 

Detailed Description

ZLIB compression.

Definition at line 17 of file Zlib.php.

Constructor & Destructor Documentation

fpoirotte\Pssht\Compression\Zlib::__construct (   $mode)

Construct a (de)compression algorithm.

Parameters
opaque$modeMode in which the algorithm is being used. Either CompressionInterface::MODE_COMPRESS or CompressionInterface::MODE_UNCOMPRESS.

Implements fpoirotte\Pssht\Compression\CompressionInterface.

Definition at line 33 of file Zlib.php.

References fpoirotte\Pssht\Compression\Zlib\$mode.

Member Function Documentation

fpoirotte\Pssht\Compression\Zlib::getMode ( )

Get the mode in which the algorithm is being used.

Return values
opaqueEither CompressionInterface::MODE_COMPRESS or CompressionInterface::MODE_UNCOMPRESS.

Implements fpoirotte\Pssht\Compression\CompressionInterface.

Definition at line 59 of file Zlib.php.

References fpoirotte\Pssht\Compression\Zlib\$mode.

static fpoirotte\Pssht\Compression\Zlib::isAvailable ( )
static

Determine whether the algorithm is available.

Return values
booltrue if the algorithm is available, false otherwise.

Implements fpoirotte\Pssht\Algorithms\AvailabilityInterface.

Definition at line 64 of file Zlib.php.

fpoirotte\Pssht\Compression\Zlib::update (   $data)

Add data to (de)compress.

Parameters
string$dataAdditional data to compress or decompress, depending on the algorithm's mode.
Return values
string(Un)compressed data.

Implements fpoirotte\Pssht\Compression\CompressionInterface.

Definition at line 90 of file Zlib.php.


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