mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Added MemoryManager, new memory properties, improved performance, updated RakLib, fixed misc. bugs
This commit is contained in:
@ -32,9 +32,17 @@ class CompressBatchedTask extends AsyncTask{
|
||||
public $channel = 0;
|
||||
public $targets = [];
|
||||
|
||||
public function __construct(&$data, array $targets, $level = 7, $channel = 0){
|
||||
$this->data = $data;
|
||||
$this->targets = $targets;
|
||||
$this->level = $level;
|
||||
$this->channel = $channel;
|
||||
}
|
||||
|
||||
public function onRun(){
|
||||
try{
|
||||
$this->final = zlib_encode($this->data, ZLIB_ENCODING_DEFLATE, $this->level);
|
||||
$this->data = null;
|
||||
}catch(\Exception $e){
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user