- From: Adam Rice <notifications@github.com>
- Date: Wed, 28 Oct 2020 08:01:14 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 28 October 2020 15:01:27 UTC
@ricea commented on this pull request. lgtm with one suggestion for improvement. Let's wait for @domenic to take a look. > +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. + + +``` You can use \`\`\`javascript to cause the example to be highlighted as JavaScript. -- 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#pullrequestreview-518759806
Received on Wednesday, 28 October 2020 15:01:27 UTC