Add support for brotli (#1000)
parent
776706bc34
commit
1bfe32ae86
|
@ -5,6 +5,7 @@ ast 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
|
|||
bcmath 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
|
||||
bitset 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
|
||||
blackfire 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
|
||||
brotli 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
|
||||
bz2 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
|
||||
calendar 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
|
||||
cassandra 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
foreach ([
|
||||
'brotli_compress',
|
||||
'brotli_uncompress',
|
||||
] as $function) {
|
||||
if (!function_exists($function)) {
|
||||
fwrite(STDERR, "Missing function: {$function}\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
$data = 'This is some data to be compressed';
|
||||
$compressed = brotli_compress($data, BROTLI_COMPRESS_LEVEL_MAX, BROTLI_TEXT);
|
||||
$uncompressed = brotli_uncompress($compressed);
|
||||
if ($uncompressed !== $data) {
|
||||
fwrite(STDERR, "brotli_compress() -> brotli_uncompress() failure!\n");
|
||||
exit(1);
|
||||
}
|
||||
echo "brotli_compress() -> brotli_uncompress() works\n";
|
||||
|
||||
return 0;
|
Loading…
Reference in New Issue