Skip to content

Streaming zlib compressor and decompressor, supporting GZIP format (RFC 1952), raw DEFLATE format (RFC 1951) and ZLIB format (RFC 1950), built on top of React PHP

License

Notifications You must be signed in to change notification settings

clue-labs/reactphp-zlib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clue/zlib-react Build Status

Streaming zlib compressor and decompressor, built on top of React PHP, supporting compression and decompression of the following formats:

Note: This project is in early alpha stage! Feel free to report any issues you encounter.

Quickstart example

Once installed, you can use the following code to pipe a readable gzip file stream into an decompressor which emits decompressed data events for each individual file chunk:

$loop = React\EventLoop\Factory::create();
$stream = new Stream(fopen('access.log.gz', 'r'), $loop);

$decompressor = ZlibFilterStream::createGzipDecompressor();

$decompressor->on('data', function ($data) {
    echo $data;
});

$stream->pipe($decompressor);

$loop->run();

See also the examples.

Install

The recommended way to install this library is through composer. New to composer?

$ composer require clue/zlib-react:dev-master

License

MIT

About

Streaming zlib compressor and decompressor, supporting GZIP format (RFC 1952), raw DEFLATE format (RFC 1951) and ZLIB format (RFC 1950), built on top of React PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%