PATH:
opt
/
alt
/
tests
/
alt-php80-pecl-brotli_0.18.3-2.el8
/
tests
--TEST-- use dictionary: arguments --SKIPIF-- <?php if (BROTLI_DICTIONARY_SUPPORT === false) die('skip dictionary not supported'); ?> --FILE-- <?php include(dirname(__FILE__) . '/data.inc'); $dictionary = file_get_contents(dirname(__FILE__) . '/data.dict'); function check($data, $dictionary, $level, $mode) { switch ($mode) { case BROTLI_GENERIC: $modeName = 'generic'; break; case BROTLI_TEXT: $modeName = 'text'; break; case BROTLI_FONT: $modeName = 'font'; break; default: $modeName = ''; } $output = brotli_compress($data, $level, $mode, $dictionary); echo $level, ' -- ', $modeName, ' -- ', ($dictionary === null ? 'null' : 'dict'), ' -- ', var_export( (($output === false) ? false : brotli_uncompress($output, $dictionary) === $data), true ), PHP_EOL; } echo "*** Compression Level ***", PHP_EOL; $mode = BROTLI_GENERIC; for ( $level = BROTLI_COMPRESS_LEVEL_MIN; $level <= BROTLI_COMPRESS_LEVEL_MAX; $level++ ) { check($data, $dictionary, $level, $mode); } echo "*** Compression Mode ***", PHP_EOL; $level = BROTLI_COMPRESS_LEVEL_DEFAULT; check($data, $dictionary, $level, BROTLI_GENERIC); check($data, $dictionary, $level, BROTLI_TEXT); check($data, $dictionary, $level, BROTLI_FONT); $mode = BROTLI_GENERIC; echo "*** Compression Dictionary ***", PHP_EOL; check($data, null, $level, $mode); ?> ===DONE=== --EXPECTF-- *** Compression Level *** 0 -- generic -- dict -- true 1 -- generic -- dict -- true 2 -- generic -- dict -- true 3 -- generic -- dict -- true 4 -- generic -- dict -- true 5 -- generic -- dict -- true 6 -- generic -- dict -- true 7 -- generic -- dict -- true 8 -- generic -- dict -- true 9 -- generic -- dict -- true 10 -- generic -- dict -- true 11 -- generic -- dict -- true *** Compression Mode *** 11 -- generic -- dict -- true 11 -- text -- dict -- true 11 -- font -- dict -- true *** Compression Dictionary *** 11 -- generic -- null -- true ===DONE===
[-] ob_008.phpt
[edit]
[-] ob_dcb_001.phpt
[edit]
[-] ob_005.phpt
[edit]
[-] dictionary_streams.phpt
[edit]
[-] info.phpt
[edit]
[-] ob_009.phpt
[edit]
[-] data.inc
[edit]
[-] ob_002.phpt
[edit]
[-] streams_002.phpt
[edit]
[-] incremental_compress_add_basic.phpt
[edit]
[+]
files
[-] ob_dcb_005.phpt
[edit]
[-] alias.phpt
[edit]
[-] ob_007.phpt
[edit]
[-] named_args_incremental.phpt
[edit]
[-] compatibility.phpt
[edit]
[-] incremental_uncompress_add_basic.phpt
[edit]
[-] dictionary_ob.phpt
[edit]
[-] ob_003.phpt
[edit]
[-] ob_010.phpt
[edit]
[-] files.inc
[edit]
[+]
..
[-] dictionary_named_args.phpt
[edit]
[-] incremental_uncompress_add_alias.phpt
[edit]
[-] streams_006.phpt
[edit]
[-] streams_005.phpt
[edit]
[-] compress_add.phpt
[edit]
[-] ob_dcb_004.phpt
[edit]
[-] ob_004.phpt
[edit]
[-] dictionary_named_args_incremental.phpt
[edit]
[-] roundtrip.phpt
[edit]
[-] data.dict
[edit]
[-] compress_args.phpt
[edit]
[-] dictionary_args.phpt
[edit]
[-] ob_dcb_003.phpt
[edit]
[-] ob_006.phpt
[edit]
[-] streams_001.phpt
[edit]
[-] named_args.phpt
[edit]
[-] dictionary_incremental.phpt
[edit]
[-] ob_dcb_002.phpt
[edit]
[-] ob_011.phpt
[edit]
[-] dictionary_basic.phpt
[edit]
[-] streams_003.phpt
[edit]
[-] apcu_serializer.phpt
[edit]
[-] incremental_compress_add_alias.phpt
[edit]
[-] incremental_compress_add_args.phpt
[edit]
[-] streams_004.phpt
[edit]
[-] ob_001.phpt
[edit]