maxogden/filereader-stream — pull request #6 by konklone (2014-10-13 07:36:51+00:00)
Title: Respond to backpressure suggestions

This updates `filereader-stream` to listen to backpressure suggestions from downstream.

This is my first meaningful stream work, and I'm prepared to be told I've done something silly. But it seems to work in empirical testing. Without this patch, filereader-stream has no way to be told to stop reading a very large file into memory.

I haven't included a test, mostly because I think it would take me a long time to figure out how to create an anonymous write stream that establishes a high watermark. Maybe it's simpler than I think? Suggestions welcome.