dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.28k stars 4.73k forks source link

[API Proposal]: Recyclable Memory Stream #101348

Open dev-tony-hu opened 6 months ago

dev-tony-hu commented 6 months ago

Background and motivation

Recyclable memory stream implemented in dotnet runtime. https://github.com/Microsoft/Microsoft.IO.RecyclableMemoryStream Could you help to consider if it is helpful to move this library into dotnet runtime.

API Proposal

https://github.com/Microsoft/Microsoft.IO.RecyclableMemoryStream

API Usage

Used for memory optimized stream using.

Alternative Designs

No response

Risks

No response

dotnet-policy-service[bot] commented 6 months ago

Tagging subscribers to this area: @dotnet/area-system-io See info in area-owners.md if you want to be subscribed.

alexrp commented 6 months ago

There's a whole bunch of stuff in that library that is almost certainly not appropriate for the BCL. So if you want to propose inclusion of this library in the BCL, you need to actually type up an API shape for the proposal.

jozkee commented 4 months ago

What's the benefits of moving this into dotnet/runtime? Does it need to continue being a OOB package or can it ship inbox? cc @benmwatson @paulomorgado

paulomorgado commented 4 months ago

For the BCL, I would do something on top of MemoryPool<byte> or ArrayPool<byte>.

I've been thinking of exploring this, but haven't had the time to do so.