承接 nazar-pc/stream-slicer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

nazar-pc/stream-slicer

Composer 安装命令:

composer require nazar-pc/stream-slicer

包简介

Get slice of any seekable stream

README 文档

README

![Build Status](https://img.shields.io/travis/nazar-pc/stream-slicer/master.svg?label=Travis CI)

Stream slicer - Get slice of any seekable stream

When working with PHP streams you sometimes need to have a slice of some stream.

For instance, you're parsing a huge multipart message with multiple uploaded files. Obviously, you don't want to store gibibytes of data all in memory. so you're using stream and parse it piece by piece. But when you encounter the beginning of large file within that stream you'll also want to avoid storing it into memory or copy to some place in addition to original data. Unfortunately, PHP itself doesn't have primitive to create slice of that stream, but thanks to Stream slicer you can do it very easily.

Requirements:

  • PHP 5.6+ or HHVM

How to use?

Simply add dependency on nazar-pc/stream-slicer to your project's composer.json:

{
    "require": {
        "nazar-pc/stream-slicer": "1.*"
    }
}
<?php
$stream = fopen('very-huge-multipart.bin', 'rb');
$file = \nazarpc\Stream_slicer::slice(
	$stream,
	1024 * 1024 * 50,
	1024 * 1024 * 1024
);

Contribution

Feel free to create issues and send pull requests, they are highly appreciated!

License

MIT License, see license.txt

统计信息

  • 总下载量: 31
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固