Hacker News new | ask | show | jobs
by AndyKelley 301 days ago
It's to keep buffered bytes buffered until the producer is ready for them to be dropped. This is relevant for example for decompression streams which keep a "window" of decompressed bytes around to refer to when matching. Of course, the implementation could use an internal ring buffer, but it's more efficient to use the output buffer directly instead.