Re: [whatwg/streams] WritableStreamDefaultWriterGetDesiredSize(writer) cannot in general be used to determine size of chunks read by pipeTo (#938)

Hmm. I'm not sure this is so nonsensical. The whole piping/backpressure infrastructure basically relies on matching notions of "size" across the pipe. Or if not relies, at least assumes.

So the intention of this, from what I can tell, is: the writer says it wants 1024 Xs. We normally don't know how to get 1024 Xs; we just read one chunk, measure the size, and see how many Xs we got, then adjust as we go along. But if you're piping a readable byte stream to something that says it wants 1024 Xs, let's assume X is "bytes", and then we can ask the readable byte stream for exactly 1024 of those.

Seems OK?

-- 
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/issues/938#issuecomment-409287984

Received on Tuesday, 31 July 2018 16:43:39 UTC