Skip to content

readAllBytes

readAllBytes(stream): Promise<Uint8Array<ArrayBufferLike>>

Defined in: packages/synapse-core/src/utils/streams.ts:125

Read a byte stream to the end and concatenate its chunks.

Rejects with the stream’s own error if it errors. new Response(stream).arrayBuffer() is not a substitute: browsers replace the stream’s error with a generic TypeError.

Parameter Type Description
stream ReadableStream<Uint8Array<ArrayBufferLike>> The stream to read

Promise<Uint8Array<ArrayBufferLike>>

All bytes from the stream