dev-master
9999999-devStream files as zip archive on the fly
BSD-3-Clause
The Requires
- php >=5.3.0
- guzzlehttp/streams ^3.0
The Development Requires
by Jacek Kobus
Wallogit.com
2017 © Pedro Peláez
Stream files as zip archive on the fly
Stream your files as a zip stream without wasting server's memory., (*1)
<?php
header('Content-disposition: attachment; filename="zip-stream-example.zip"');
header('Content-Type: application/octet-stream');
require_once __DIR__ . '/vendor/autoload.php';
$zipStream = new \PHPExtra\ZipStream\ZipStream(array(__DIR__ . '/5GB-large-file.mp3'));
while(!$zipStream->eof()){
echo $zipStream->read(8192);
}
$zipStream->close();
{
"require": {
"phpextra/zip-stream":"*"
}
}
No releases yet
All code contributions must go through a pull request. Fork the project, create a feature branch, and send me a pull request. To ensure a consistent code base, you should make sure the code follows the coding standards. If you would like to help take a look at the list of issues., (*3)
Jacek Kobus - <kobus.jacek@gmail.com>
See the file LICENSE.txt for copying permission
Stream files as zip archive on the fly
BSD-3-Clause