Bun.readableStreamToArrayBuffer reads the contents of a ReadableStream into an ArrayBuffer.
const stream = new ReadableStream();
const buf = await Bun.readableStreamToArrayBuffer(stream);
Runtime docs · Guides · Streams
Read the entire contents of a ReadableStream into an ArrayBuffer with Bun.readableStreamToArrayBuffer().
Bun.readableStreamToArrayBuffer reads the contents of a ReadableStream into an ArrayBuffer.
const stream = new ReadableStream();
const buf = await Bun.readableStreamToArrayBuffer(stream);