mirror of
https://github.com/mlocati/docker-php-extension-installer
synced 2025-05-10 00:52:45 +00:00
Fine-tune lz4 support (#599)
This commit is contained in:
parent
b21d17013a
commit
9c368ab598
3 changed files with 20 additions and 1 deletions
18
scripts/tests/lz4
Executable file
18
scripts/tests/lz4
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/_bootstrap.php';
|
||||
|
||||
const ORIGINAL_DATA = 'Hi, there!';
|
||||
|
||||
$compressed = lz4_compress(ORIGINAL_DATA);
|
||||
if (!is_string($compressed) || $compressed === '') {
|
||||
fwrite(STDERR, 'lz4_compress() failed!');
|
||||
exit(1);
|
||||
}
|
||||
$uncompressed = lz4_uncompress($compressed);
|
||||
if ($uncompressed !== ORIGINAL_DATA) {
|
||||
fwrite(STDERR, 'lz4_uncompress() failed!');
|
||||
exit(1);
|
||||
}
|
||||
exit(0);
|
Loading…
Add table
Add a link
Reference in a new issue