tests for brotli and xz

This commit is contained in:
DubbleClick 2025-06-05 16:42:52 +07:00
parent a9d37bb2a2
commit e2191113b0
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,8 @@
<?php
declare(strict_types=1);
$str = 'brotli_compress ( string $data, int $level = BROTLI_COMPRESS_LEVEL_DEFAULT, int $mode = BROTLI_GENERIC, string|null $dict = null ): string|false';
assert(function_exists('brotli_compress'));
assert(function_exists('brotli_uncompress '));
assert(brotli_uncompress(brotli_compress($str)) === $str);

View File

@ -0,0 +1,8 @@
<?php
declare(strict_types=1);
$str = 'Data you would like compressed.';
assert(function_exists('xzencode'));
assert(function_exists('xzdecode'));
assert(xzdecode(xzencode($str)) === $str);