- From: Nidhi Jaju <notifications@github.com>
- Date: Wed, 28 Oct 2020 18:45:58 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 29 October 2020 01:46:12 UTC
@nidhijaju commented on this pull request. > +readers can reduce the number of times we run garbage collection, because we can reuse buffers. + + +## Examples + +These are a few examples of Javascript which can be used for byte streams once this is implemented: + + +### Reading bytes from the stream into a single memory buffer + +The code reads the first 1024 bytes from the stream into a single memory buffer. This is due to the fact that if a +stream is a readable byte stream, you can also acquire a BYOB reader for it, which allows more precise control over +buffer allocation in order to avoid copies. + + +``` Ah okay, cool, I've added that in now :) Thank you! -- 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_r513868678
Received on Thursday, 29 October 2020 01:46:12 UTC