PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\network\mcpe\compression\Compressor Interface Reference
+ Inheritance diagram for pocketmine\network\mcpe\compression\Compressor:
+ Collaboration diagram for pocketmine\network\mcpe\compression\Compressor:

Public Member Functions

 compress (string $payload)
 
 decompress (string $payload)
 
 getCompressionThreshold ()
 
 getNetworkId ()
 

Detailed Description

Definition at line 28 of file Compressor.php.

Member Function Documentation

◆ decompress()

pocketmine\network\mcpe\compression\Compressor::decompress ( string $payload)
Exceptions
DecompressionException

Implemented in pocketmine\network\mcpe\compression\ZlibCompressor.

◆ getCompressionThreshold()

pocketmine\network\mcpe\compression\Compressor::getCompressionThreshold ( )

Returns the minimum size of packet batch that the compressor will attempt to compress.

The compressor's output MUST still be valid input for the decompressor even if the compressor input is below this threshold. However, it may choose to use a cheaper compression option (e.g. zlib level 0, which simply wraps the data and doesn't attempt to compress it) to avoid wasting CPU time.

Implemented in pocketmine\network\mcpe\compression\ZlibCompressor.

◆ getNetworkId()

pocketmine\network\mcpe\compression\Compressor::getNetworkId ( )

Returns the canonical ID of this compressor, used to tell the remote end how to decompress a packet compressed with this compressor.

Returns
CompressionAlgorithm::*

Implemented in pocketmine\network\mcpe\compression\ZlibCompressor.


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