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

Public Member Functions

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

Public Attributes

const MODE_COMPRESS = 0
 Use the algorithm for compression.
 
const MODE_UNCOMPRESS = 1
 Use the algorithm for decompression.
 

Additional Inherited Members

- Static Public Member Functions inherited from fpoirotte\Pssht\Algorithms\AlgorithmInterface
static getName ()
 Return the name of the algorithm.
 

Detailed Description

Interface for a (de)compression algorithm.

Definition at line 17 of file CompressionInterface.php.

Constructor & Destructor Documentation

fpoirotte\Pssht\Compression\CompressionInterface::__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.

Implemented in fpoirotte\Pssht\Compression\Zlib, fpoirotte\Pssht\Compression\OpensshCom\Zlib, and fpoirotte\Pssht\Compression\None.

Member Function Documentation

fpoirotte\Pssht\Compression\CompressionInterface::getMode ( )
fpoirotte\Pssht\Compression\CompressionInterface::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.

Implemented in fpoirotte\Pssht\Compression\Zlib, fpoirotte\Pssht\Compression\OpensshCom\Zlib, and fpoirotte\Pssht\Compression\None.


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