Closed megalithos closed 4 months ago
Good idea. I think it'd be sufficient to add this only for byte arrays—other types don't really need this, or would you disagree? I'm no longer actively working on this project, but maybe @xzippyzachx is interested in adding this? Or perhaps you'd be willing to do it yourself and make a PR? Just make sure to follow the contributing guidelines.
Maybe AddBytes could get parameters for length & start position, so that if you are pooling arrays with ArrayPool or just have a large buffer, you don't have to just allocate new array with new keyword to be able to add the original byte array to the message.