Roll our own buffering.

Not sure why this is necessary given that streams have high water marks, but
this has a dramatic improvement in performance.