ZlibCompressor: use libdeflate if available

I may make libdeflate mandatory later on, but right now we haven't been able to ship it on all platforms yet.
This commit is contained in:
Dylan K. Taylor
2020-10-13 17:30:27 +01:00
parent eabfd2a37b
commit 03837c1b71
2 changed files with 11 additions and 0 deletions

View File

@ -23,6 +23,10 @@ declare(strict_types=1);
define('pocketmine\_PHPSTAN_ANALYSIS', true);
if(!extension_loaded('libdeflate')){
function libdeflate_deflate_compress(string $data, int $level = 6) : string{}
}
//TODO: these need to be defined properly or removed
define('pocketmine\COMPOSER_AUTOLOADER_PATH', dirname(__DIR__, 2) . '/vendor/autoload.php');
define('pocketmine\PLUGIN_PATH', '');