frizinak/zip-streamer 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

frizinak/zip-streamer

最新稳定版本:0.1.4

Composer 安装命令:

composer require frizinak/zip-streamer

包简介

Stream zipped data while adding files

README 文档

README

Build Status

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-24