This extension allows Snappy.
Documentation for Snappy can be found at » http://google.github.io/snappy/.
% git clone --recursive --depth=1 https://github.com/kjdev/php-ext-snappy.git
% cd php-ext-snappy
% phpize
% ./configure
% make
% make install
To use the system library
% ./configure --with-snappy-includedir=/usr
RPM packages of this extension are available in » Remi's RPM repository and are named php-snappy.
snappy.ini:
extension=snappy.so
string snappy_compress( string $data )
data:
The data to compress.
The compressed string or FALSE if an error occurred.
string snappy_uncompress( string $data )
name:
The data compressed by snappy_gzcompress().
The original uncompressed data or FALSE on error.
$compressed = snappy_compress('Compress me');
$uncompressed = snappy_uncompress($compressed);
echo $uncompressed;