This extension allows LZ4.
Documentation for LZ4 can be found at » http://code.google.com/p/lz4/.
% phpize
% ./configure
% make
% make install
lz4.ini:
extension=lz4.so
- lz4_compress — LZ4 compression
- lz4_uncompress — LZ4 decompression
string lz4_compress ( string $data [ , bool $high = false , string $extra = NULL ] )
LZ4 compression.
-
data
The string to compress.
-
high
High Compression Mode.
-
extra
Prefix to compressed data.
Returns the compressed data or FALSE if an error occurred.
string lz4_uncompress ( string $data [ , long $maxsize = -1 , long $offset = -1 ] )
LZ4 decompression.
-
data
The compressed string.
-
maxsize
Allocate size output data.
-
offset
Offset to decompressed data.
Returns the decompressed data or FALSE if an error occurred.
$data = lz4_compress('test');
lz4_uncompress($data);
$data = lz4_compress('test')
$data = lz4_compress('test', false, 'PREFIX')
lz4_uncompress($data);
lz4_uncompress($data, 256, 6);