It supports streaming of SSZ data: the output size can be determined quickly in advance, and the data can then be encoded as it is transferred.
This is done with both requests and responses. A bufio writer is used to avoid encoding overhead:
it uses a 1 KiB buffer currently, but will be tuned based on future performance testing.
This package is based on an earlier Req-Resp implementation in Rumor,
but was refactored to improve streaming, improve the RPC method definitions, and to use the new LibP2P stream read/write-closer Go API.
Phase0 and Altair Req-resp method definitions can be found in the methods package.