- From: Nidhi Jaju <notifications@github.com>
- Date: Wed, 28 Oct 2020 18:45:25 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 29 October 2020 01:45:38 UTC
@nidhijaju commented on this pull request.
> + async pull(controller) {
+ // Even when the consumer is using the default reader, the auto-allocation
+ // feature allocates a buffer and passes it to us via byobRequest.
+ const v = controller.byobRequest.view;
+ v = crypto.getRandomValues(v);
+ controller.byobRequest.respond(v.byteLength);
+ },
+
+ autoAllocateChunkSize: DEFAULT_CHUNK_SIZE
+ });
+}
+```
+
+
+With this in hand, we can create and use BYOB readers for the returned ReadableStream. The adaptation between the
+low-level byte tracking of the underlying byte source shown here, is all taken care of automatically by the streams
Sorry! I just added the missing part in.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/1081#discussion_r513868519
Received on Thursday, 29 October 2020 01:45:38 UTC