nerou / lz4frame
Compress/decompress data to LZ4 blocks or frames
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:Rust
Type:php-ext
Ext name:ext-lz4frame
pkg:composer/nerou/lz4frame
This package is auto-updated.
Last update: 2025-11-07 11:54:56 UTC
README
Note
The pull request to add LZ4 Frame format support to kjdev/lz4 has been merged, such that it supports the LZ4 Frame format since version 0.6.0. Therefore and because this repository does not support compression levels, this repository is obsolete.
This extension adds support for the LZ4 compression algorithm.
Unlike kjdev/lz4, this extension...
- is based on lz4_flex rather than Cyan4973's LZ4
- supports the LZ4 Frame format, which adds checksums, magic bytes etc.
- does not (yet) support compression levels, since lz4_flex does not
Install
It is recommended to install this extension via PIE:
pie install nerou/lz4frame
Usage
Have a look at the stubs file to see the API.
If you are wondering what the block vs. frame formats are, have a look at Block Format and Frame Format. Short version: While the Block format is just the compressed data in a more or less raw variant, the Frame format adds a header and footer around it, which contain magic bytes, checksums, length information etc. Therefore, the Frame format is much easier to recognize as being LZ4 compressed data compared to the Block format and you get better integrity due to the (optional) checksums.
License
This project is licensed under the MIT license.