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

https://streams.spec.whatwg.org/commit-snapshots/d422f997bcdd6435fcc2e7eb531ee5635dae4887/#ref-for-chunk①⑧

> If reader is a BYOB reader, WritableStreamDefaultWriterGetDesiredSize\(writer\) should be used to determine the size of the chunks read from reader\.

This doesn't work unless the strategy of _writer_ measures chunks in bytes. In general it is not possible to determine this except possibly by checking the strategy `size` function for equality with `ByteLengthQueuingStrategy.prototype.size`.

I've discussed this with @domenic before, but I don't think we have an issue filed. I think we should try to find some text that retains the intent while not expecting implementations to do things that make no sense.

-- 
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

Received on Tuesday, 10 July 2018 14:24:04 UTC