pssht
latest
SSH server library written in PHP
|
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 | getName () |
Return the name of the algorithm. | |
Interface for a (de)compression algorithm.
Definition at line 17 of file CompressionInterface.php.
fpoirotte\Pssht\Compression\CompressionInterface::__construct | ( | $mode | ) |
Construct a (de)compression algorithm.
opaque | $mode | Mode 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.
fpoirotte\Pssht\Compression\CompressionInterface::getMode | ( | ) |
Get the mode in which the algorithm is being used.
opaque | Either CompressionInterface::MODE_COMPRESS or CompressionInterface::MODE_UNCOMPRESS. |
Implemented in fpoirotte\Pssht\Compression\Zlib, and fpoirotte\Pssht\Compression\None.
Referenced by fpoirotte\Pssht\Transport\setCompressor(), and fpoirotte\Pssht\Transport\setUncompressor().
fpoirotte\Pssht\Compression\CompressionInterface::update | ( | $data | ) |
Add data to (de)compress.
string | $data | Additional data to compress or decompress, depending on the algorithm's mode. |
string | (Un)compressed data. |
Implemented in fpoirotte\Pssht\Compression\Zlib, fpoirotte\Pssht\Compression\OpensshCom\Zlib, and fpoirotte\Pssht\Compression\None.