2017 © Pedro Peláez
 

library gzstream

Provide gzip file streams for guzzle and s3

image

cyberdummy/gzstream

Provide gzip file streams for guzzle and s3

  • Saturday, August 8, 2015
  • by cyberdummy
  • Repository
  • 1 Watchers
  • 6 Stars
  • 6,995 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 22 % Grown

The README.md

GzStreams for PHP

Provides additional stream wrappers for guzzle and S3 streams so you can read and write gzip files., (*1)

Installation with Composer

composer require cyberdummy/gzstream

Usage

Usage in guzzle, wrap the body stream in the new decorator., (*2)

use Cyberdummy\GzStream\GzStreamGuzzle;

$newBodyStream = new GzStreamGuzzle($psr7BodyStream);

Usage with S3 stream wrapper., (*3)

use Cyberdummy\GzStream\GzS3Wrapper;

$s3Client = new Aws\S3\S3Client([
    'version'     => 'latest'
]);

# Register the wrapper as "s3gz"
GzS3Wrapper::register($s3Client, 's3gz');

# Stream a read
$stream = fopen('s3gz://somebucket/somegzippedfile.txt.gz', 'r');
$line = fgets($stream, 1024);

# Stream a write
$stream = fopen('s3gz://somebucket/somegzippedfile.txt.gz', 'w');
fwrite($stream, "Something to compress");
fclose($stream);

The Versions

08/08 2015

dev-master

9999999-dev

Provide gzip file streams for guzzle and s3

  Sources   Download

MIT

The Requires

 

The Development Requires

by Tom Westcott

08/08 2015

0.0.2

0.0.2.0

Provide gzip file streams for guzzle and s3

  Sources   Download

MIT

The Requires

 

The Development Requires

by Tom Westcott

07/08 2015

0.0.1

0.0.1.0

Provide gzip file streams for guzzle and s3

  Sources   Download

MIT

The Requires

 

The Development Requires

by Tom Westcott