- From: Jarred Sumner <notifications@github.com>
- Date: Tue, 11 Oct 2022 00:10:19 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/streams/issues/1236/1274189368@github.com>
I like that and I’ve already implemented specialized functions for each of those cases, so it would make a lot of sense to just have a separate reader Ideally, it would have a way to tell the WritableStream the format it wants too On Tue, Jun 14, 2022 at 7:00 AM James M Snell ***@***.***> wrote: > 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. > > 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, view it on GitHub > <https://github.com/whatwg/streams/issues/1236#issuecomment-1155226720>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAFNGS5GGQPMKMZURVORFOTVPCGADANCNFSM5YV6GSGA> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> > -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/issues/1236#issuecomment-1274189368 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/streams/issues/1236/1274189368@github.com>
Received on Tuesday, 11 October 2022 07:10:31 UTC