ChaosByteStreams

main

Swift async stream extras.
elegantchaos/ChaosByteStreams

ChaosByteStreams

Miscellaneous utilities for working with async byte streams.

Adds ways to:

Data

Adds a convenience initialiser to read an entire AsyncStream<UInt8> stream into a Data object

String

Adds a convenience initialiser to read an entire AsyncStream<UInt8> stream into a String object

DataBuffer

Adds a DataBuffer class which can have Data appended to it in a thread-safe manner, and which can vend one or more AsyncStream<UInt8> streams that can be used to read bytes from it asynchronously.

Any streams made in this way stay alive until close() is called on the buffer backing them.

Description

  • Swift Tools 6.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Tue May 13 2025 15:46:03 GMT-0900 (Hawaii-Aleutian Daylight Time)