frizinak/zip-streamer
最新稳定版本:0.1.4
Composer 安装命令:
composer require frizinak/zip-streamer
包简介
Stream zipped data while adding files
README 文档
README
Usage
$output = new ThrottledHttp('download', 1024 * 1024 * 3); // Stream ~3 MB/s $zip = new ZipStreamer($output); foreach($images as $filePath){ $zip->add('images/' . basename($filePath), $filePath); // No deflation $zip->send(); // starts reading from $filePath and streaming the zip. } foreach($httpTextFiles as $fileUri) { $zip->add('txts/' . basename($fileUri), $fileUri, 9); // Max deflation level. } $fh = fopen('http://www.google.com', 'rb'); $zip->add('google.html', $fh, -1); // Default zlib delfation level. $zip->flush(); // Sends any remaining files and finishes streaming the zip.
License: MIT
统计信息
- 总下载量: 22.41k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-10-24