Skip to content

Commit 2f25409

Browse files
committed
add lz4 test
1 parent 67320d3 commit 2f25409

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/globals/ext-tests/lz4.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
assert(function_exists('lz4_compress'));
6+
assert(function_exists('lz4_uncompress'));
7+
8+
$input = str_repeat('The quick brown fox jumps over the lazy dog. ', 10);
9+
$compressed = lz4_compress($input);
10+
assert(is_string($compressed));
11+
assert(strlen($compressed) < strlen($input));
12+
13+
$uncompressed = lz4_uncompress($compressed);
14+
assert(is_string($uncompressed));
15+
assert($uncompressed === $input);

0 commit comments

Comments
 (0)