-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[c#] Add OutputBuffer virtual resize buffer method
`OutputBuffer` always uses `new byte[]` to create/resize its internal buffer. Implementing a custom `IOutputBuffer` that uses a different allocation scheme requires duplicating a lot of code in `OutputBuffer` and `IntegerHelper`. Add a virtual method `OutputBuffer.ResizeBuffer` that can be overridden to use buffer allocators other than `new byte[]` (e.g. `ArrayPool<byte>.Rent()`)
- Loading branch information
Showing
2 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters