Re: [streams] Add ReadableByteStream observing API (#362)

Sorry that I haven't had much time to look at streams today. But hopefully these few comments will be useful before I can spend tomorrow on them in more depth.

I don't quite understand the advantage of these types of solutions over e.g. adding `bytesRead` to the reader? (Or adding `bytesRead` to the stream and having it be `null` or not updating it while the stream is locked, maybe. There are variations.)

I realize that an observer-type solution would tell you when `bytesRead` updates. But that's not actually important for any of our use cases now, right?

> One more question. What if a ReadableStream (not ReadableByteStream) is passed to the Request constructor?

I think in this case we need to pipe the stream to some kind of identity transform stream that also validates that the chunks are Uint8Arrays (or maybe transfers other types into new Uint8Arrays?). It is not an easy case.

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

Received on Tuesday, 16 June 2015 00:42:27 UTC