Skip to content

Commit f688691

Browse files
committed
Allow usage of ext-lz4frame instead of ext-lz4
1 parent acb4438 commit f688691

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/LargeArrayBuffer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function __construct(int $maxMemoryMiB = 1024, int $serializer = self::SE
6767
}
6868

6969
$this->compression = $compression;
70-
if($this->compression === self::COMPRESSION_LZ4 && !extension_loaded('lz4')){
70+
if($this->compression === self::COMPRESSION_LZ4 && !extension_loaded('lz4') && !extension_loaded('lz4frame')){
7171
throw new \InvalidArgumentException('LZ4 compression was requested, but ext-lz4 is not loaded');
7272
}
7373

test/LargeArrayBufferTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static function provideConfig(): \Generator {
4646
'none' => LargeArrayBuffer::COMPRESSION_NONE,
4747
'GZIP' => LargeArrayBuffer::COMPRESSION_GZIP
4848
];
49-
if(extension_loaded('lz4')){
49+
if(extension_loaded('lz4') || extension_loaded('lz4frame')){
5050
$compressors['LZ4'] = LargeArrayBuffer::COMPRESSION_LZ4;
5151
}
5252
foreach($serializers as $s => $serializer){

0 commit comments

Comments
 (0)