Skip to content

Microsoft.IO.RecyclableMemoryStream 2.2.0

Compare
Choose a tag to compare
@benmwatson benmwatson released this 06 Oct 20:58
· 96 commits to master since this release
667bec5

API changes:

  • Add an override for GetStream that takes a ReadOnlySpan<byte>. This supercedes the versions of GetStream that take Memory<byte>, which were marked as [Obsolete].

Bug Fixes:

  • Fixed: GetReadOnlySequence() throws ArgumentOutOfRangeException

Performance Improvements:

  • Removed enumerator allocation when returning blocks to the pool.
  • Changed default size of stream's block list to 0 because EnsureCapacity will always run, potentially resizing the list anyway.
  • Removed unneeded closure allocation when copying buffers.
  • Use GC.AllocateUninitializedArray in an additional spot, for better performance in .NET 5+.

Documentation:

  • Improved documentation, standardized puncutation, fixed code formatting.

NuGet: Microsoft.IO.RecyclableMemoryStream 2.2.0