Re: [streams] What types does ReadableByteStream's reader's read(x) accept and return? (#295)

I also considered to return (fulfill the returned promise with) a tuple of the view and the number of filled bytes.

But, ... if the consumer wants to fill only part (not aligned to the boundaries of elements) of a TypedArray with non-1 BYTES_PER_ELEMENT, they can still choose to extract the underlying buffer and pass wrapped with a Uint8Array to the BYOB interface. So, maybe, it makes more sense to give a functionality of aligned filling (i.e. returns only when at least one element is fully filled, and with no partially filled elements) to invocation of read(view) with a TypedArray with non-1 BYTES_PER_ELEMENT.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/295#issuecomment-108732963

Received on Thursday, 4 June 2015 05:35:59 UTC