2017 © Pedro Peláez
 

library substream

PHP stream wrapper for using only a portion of a stream.

image

iqb/substream

PHP stream wrapper for using only a portion of a stream.

  • Friday, April 13, 2018
  • by dennisbirkholz
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

(Read-only) PHP stream wrapper for using only a portion of a stream.

Build Status Code Coverage Software License, (*1)

Issues/pull requests

This repository is a subtree split of the iqb/Morgue repository so it can be required as a stand alone package via composer. To open an issues or pull request, please go to the iqb/Morgue repository., (*2)

Installation

Via composer:, (*3)

composer require iqb/substream

Usage

The stream wrapper is registered for the iqb.substream:// protocol. To use as substream, just open a new like that:, (*4)


use const iqb\stream\SUBSTREAM_SCHEME; $originalStream = \fopen('filename', 'r'); $offset = 25; $length = 100; $substream = \fopen(SUBSTREAM_SCHEME . "://$offset:$length/" . (int)$originalStream); \fseek($orignalStream, 50); \fseek($substream, 25); // Will not fail assert(\fread($originalStream, 50) === \fread($substream, 50));

The Versions

13/04 2018

dev-master

9999999-dev

PHP stream wrapper for using only a portion of a stream.

  Sources   Download

LGPL-3.0-or-later

The Requires

  • php >=7.0

 

The Development Requires

by Dennis Birkholz