Here it would probably be good to make the size of the buffer configurable. And maybe default to 100 KB or something. I think the default is around 8KB for this stream.