- From: James M Snell <notifications@github.com>
- Date: Tue, 14 Jun 2022 07:00:38 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 14 June 2022 14:00:50 UTC
I've been considering the possibility of a new kind of reader that implements the `Body` mixin, which would provide opportunities for these kinds of optimizations. e.g. ```js const readable = new ReadableStream({ ... }); const reader = new ReadableStreamBodyReader(readable); await reader.arrayBuffer(); // or await reader.blob(); // or await reader.text(); ``` The `ReadableStreamBodyReader` would provide opportunities to more efficiently consume the `ReadableStream` without going through the typical chunk-by-chunk slow path and would not require any changes to the existing standard API surface. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/issues/1236#issuecomment-1155226720 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/streams/issues/1236/1155226720@github.com>
Received on Tuesday, 14 June 2022 14:00:50 UTC