Skip to content
 
 

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages