amphp/byte-stream
A stream abstraction to make working with non-blocking I/O simple.
v2.1.2
132M downloads/mo
#304 most downloaded on Packagist
amphp/byte-stream
What this package is like to depend on
Last release 1 years ago
16 Mar 2025
Release timing varies
gaps range from 8 days to 11 months
Rarely documented
notes for 7 of 37 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
51 releases · first in 2017
0 releases in the last 12 months
see the full history below
Release timeline
51 releases · Jun 2017 to Mar 2025Releases
latest 51-
v2.1.216 Mar 2025Release notes
Open source →- Fixed the exception type thrown if
ReadableIterableStreamis closed (Amp\Pipeline\DisposedExceptionwas leaked, now anAmp\ByteStream\ClosedExceptionis thrown).
Full Changelog: v2.1.1...v2.1.2
- Fixed the exception type thrown if
-
v2.1.117 Feb 2024Release notes
Open source →What's Changed
- Fixed cancellation not being forwarded to
split()insplitLines().
Full Changelog: v2.1.0...v2.1.1
- Fixed cancellation not being forwarded to
-
v2.1.019 Nov 2023Release notes
Open source →What's Changed
Payloadnow implementsStringable- Add cancelation support for
splitby @xtrime-ru in #108
New Contributors
- @xtrime-ru made their first contribution in #108
Full Changelog: v2.0.2...v2.1.0
-
v2.0.201 Sep 2023Release notes
Open source →- Fixed throwing an
Errorwhen invokinggetStdin(),getStdout(), andgetStderr()if the corresponding STDIO stream had been previously closed. Instead, an already closed stream instance is returned.
- Fixed throwing an
-
v2.0.103 Feb 2023Release notes
Open source →- Fixed
ReadableResourceStreamcallingSuspension::resume()when destroyed, which could throw an exception when suspending from{main}and an uncaught exception was thrown from the event loop.
- Fixed
-
v2.0.007 Jan 2023Release notes
Open source →Initial stable release compatible with AMPHP v3 and fibers.
There are a number of renaming and compatibility breaks with
1.xversions:- Added interface
ResourceStream InputStreamhas been renamed toReadableStreamand now extendsAmp\Closable. Theread()method now supports an optionalCancellationparameter.OutputStreamhas been renamed toWritableStreamand now extendsAmp\Closable.WritableStream::end()no longer accepts an optional data chunk as parameter.IteratorStreamhas been repalced byReadableIterableStream, which accepts anyiterableofstrings (particularly useful withGeneratororPipeline).ResourceInputStreamhas been renamed toReadableResourceStream. Theread()method has an additional, optional$limitparameter to specify the maximum number of bytes to read.ResourceOutputStreamhas been renamed toWritableResourceStream.InMemoryStreamhas been renamed toReadableBuffer.OutputBufferhas been renamed toWritableBuffer.Payloadnow accepts astringin addition to aReadableStreamand isfinalnow.Payload::buffer()may only be called once.- Added a
$limitparam toAmp\ByteStream\buffer()andPayload::buffer()to set a limit on the maximum bytes that can be buffered. - Added
BufferedReader, a helper class for reading fromReadableStreamusing fixed lengths or delimiters found within the stream (#94) - Added
Pipe. - Added
StreamChannelimplementing theChannelinterface fromamphp/sync. - The zlib streams have been moved into the
Compressionsub-namespace and renamed toCompressingWritableStreamandDecompressingReadableStream. - Add
CompressingReadableStream(#99) - Add
DecompressingWritableStream(#99) - The base64 streams have been renamed to reflect the new interface names.
InputStreamChainhas been renamed toReadableStreamChain.- Renamed the
$optionsparam ofparseLineDelimitedJsonto$flagsto match thejson_decodefunction.
Release notes
Open source →- Marked
Payloadas final - Fixed compatibility with
amphp/[email protected](#101)
- Added interface
-
v2.0.0-beta.1423 Dec 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.1316 Nov 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.1207 Nov 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.1111 Sep 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.1025 Jun 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.905 Jun 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.803 Apr 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.726 Mar 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.605 Mar 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.507 Feb 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.401 Feb 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.318 Dec 2021 pre-releaseNothing published for this version
-
v2.0.0-beta.217 Dec 2021 pre-releaseNothing published for this version
-
v2.0.0-beta.111 Dec 2021 pre-releaseNothing published for this version
-
v1.8.213 Apr 2024Release notes
Open source →What's Changed
- Iterator Stream documentation by @tncrazvan in #80
- Add psalm.xml and .github configs to .gitattributes by @sidz in #85
- Update https instead of http in composer.json by @S-Tian86 in #88
- Fix psalm annotation by @sokil in #98
- Add explicit nullable types by @alexandre-daubois in #111
New Contributors
- @tncrazvan made their first contribution in #80
- @sidz made their first contribution in #85
- @S-Tian86 made their first contribution in #88
- @sokil made their first contribution in #98
- @alexandre-daubois made their first contribution in #111
Full Changelog: v1.8.1...v1.8.2
-
v1.8.130 Mar 2021Nothing published for this version
-
v1.8.029 Jun 2020Nothing published for this version
-
v1.7.304 Apr 2020Nothing published for this version
-
v1.7.229 Jan 2020Nothing published for this version
-
v1.7.127 Oct 2019Nothing published for this version
-
v1.7.024 Aug 2019Nothing published for this version
-
v1.6.126 Jul 2019Nothing published for this version
-
v1.6.003 Jun 2019Nothing published for this version
-
v1.5.127 Dec 2018Nothing published for this version
-
v1.5.022 Oct 2018Nothing published for this version
-
v1.4.003 Oct 2018Nothing published for this version
-
v1.3.104 Apr 2018Nothing published for this version
-
v1.3.013 Mar 2018Nothing published for this version
-
v1.2.511 Mar 2018Nothing published for this version
-
v1.2.409 Mar 2018Nothing published for this version
-
v1.2.308 Mar 2018Nothing published for this version
-
v1.2.212 Jan 2018Nothing published for this version
-
v1.2.110 Dec 2017Nothing published for this version
-
v1.2.005 Dec 2017Nothing published for this version
-
v1.1.617 Oct 2017Nothing published for this version
-
v1.1.508 Oct 2017Nothing published for this version
-
v1.1.407 Oct 2017Nothing published for this version
-
v1.1.315 Sep 2017Nothing published for this version
-
v1.1.215 Jul 2017Nothing published for this version
-
v1.1.128 Jun 2017Nothing published for this version
-
v1.1.023 Jun 2017Nothing published for this version
-
v1.0.319 Jun 2017Nothing published for this version
-
v1.0.219 Jun 2017Nothing published for this version
-
v1.0.117 Jun 2017Nothing published for this version
-
v1.0.015 Jun 2017Nothing published for this version