Download the PHP package componenta/stream-iterator without Composer
On this page you can find all versions of the php package componenta/stream-iterator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download componenta/stream-iterator
More information about componenta/stream-iterator
Files in componenta/stream-iterator
Download componenta/stream-iterator
More information about componenta/stream-iterator
Files in componenta/stream-iterator
Vendor componenta
Package stream-iterator
Short Description Stream iterator for line-based resource traversal
License MIT
Package stream-iterator
Short Description Stream iterator for line-based resource traversal
License MIT
Please rate this library. Is it a good library?
Informations about the package stream-iterator
Componenta Stream Iterator
Iterator for reading PSR-7 streams in fixed-size chunks.
Use it for uploads, downloads, hashing, conversion, and other streaming workflows where loading the full body into memory is unnecessary.
Installation
Requires psr/http-message.
Related Packages
| Package | Why it matters here |
|---|---|
psr/http-message |
StreamIterator reads PSR-7 StreamInterface. |
psr/http-message |
Uploads, downloads, and request bodies can expose PSR-7 streams. |
componenta/iterator |
Use it when replayable iteration is needed; stream iteration keeps only the current chunk. |
componenta/image-converter |
Upload streams can be read before media processing. |
Usage
Contract
StreamIterator implements Iterator and Stringable.
Important behavior:
current()is idempotent- reading happens during
rewind()andnext() - repeated calls to
current()do not consume more bytes key()returns the chunk start offsetwithStream()andwithBytes()return cloned iteratorssetBytes()mutates bytes-per-iteration on the current instance
Memory Model
The iterator keeps only the current chunk. It does not cache previous chunks and does not make a one-shot stream replayable. Use componenta/iterator if you need replayable iteration.
All versions of stream-iterator with dependencies
PHP Build Version
Package Version
The package componenta/stream-iterator contains the following files
Loading the files please wait ...