Expand description
Coalescing small encoded chunks into larger ones.
Without this, a format whose items are small (JSON Lines of short objects, say) emits one HTTP frame per item, which is dreadful wire efficiency. It matters on the sending side in both directions: a client uploading a stream has exactly the same problem as a server returning one.
Core yields Bytes; wrapping them in whatever frame type the HTTP layer wants is the
binding crate’s job.
Functions§
- buffer_
bytes - Coalesce output into chunks of at least
sizebytes. - buffer_
ready_ items - Coalesce every
countitems that are ready at the same time into one chunk.