Re: [whatwg/streams] light weight transformations (#461)

I recently looked into simple stream transforms as well. After considering & implementing several options I settled on a simple pull solution based on the reader interface: `makeTransform(readable or reader)` returning a reader interface `{ read(): Promise<chunk>, cancel(): Promise }`.  Composition of such pull tranforms [relatively easy](https://github.com/gwicke/mixmaster/blob/f42073c373914149e26b2a97155c453a6e86def7/index.js#L51-L56), as is [converting the exposed `reader` interface into an UnderlyingSource](https://github.com/gwicke/mixmaster/blob/f42073c373914149e26b2a97155c453a6e86def7/index.js#L153-L167) for consumption & buffering in a ReadableStream.

I'm not entirely convinced that the complexity of WritableStream and TransformStream is worth it. There are already several ways of achieving very similar things in the spec (ex: Reader vs. UnderlyingSource), and I fear that adding even more ways is only going to make it more confusing.

---
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/461#issuecomment-235439515

Received on Tuesday, 26 July 2016 23:42:26 UTC