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].
Fixed another integer overrun math bug related to the new 64-bit data sizes that handle longer streams. The tests have also been updated to check for more issues like this.
Added RecyclableMemoryStreamManager constructor overloads that take parameters for specifying the maximum free pool sizes. Updated IntelliSense documentation to make clear that these values need to be explciitly set to avoid unbounded pool growth.
Buffers are now allocated using GC.AllocateUninitializedArray in .NET 5.
net462 and netstandard2.0 targets can now support the Span-related APIs via a dependency on System.Memory.
Updated documentation to fix typos and clarify language in some parts.
Removed 2 GB stream limit. Extremely large streams can be created by chaining together blocks. Attempts to convert a stream into a contiguous buffer longer than the runtime's limits will result in an exception.
Removed build targets for net40, net45, net46, and netstandard1.4. Added net462.
Changed some ETW events to provide more information.
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].
Fixed another integer overflow error when returning buffers to the pool.
Version 2.1.2
Bug Fixes:
Added [SecurityRules(SecurityRuyleSet.Level1)] to assembly to allow more relaxed inheritance security rules.
Fixed an integer overflow when calculating large buffer sizes.
Version 2.1.0
Added RecyclableMemoryStreamManager constructor overloads that take parameters for specifying the maximum free pool sizes. Updated IntelliSense documentation to make clear that these values need to be explciitly set to avoid unbounded pool growth.
Buffers are now allocated using GC.AllocateUninitializedArray in .NET 5.
net462 and netstandard2.0 targets can now support the Span-related APIs via a dependency on System.Memory.
Updated documentation to fix typos and clarify language in some parts.
Support for Source Link
Version 2.0
Breaking Changes
Removed 2 GB stream limit. Extremely large streams can be created by chaining together blocks. Attempts to convert a stream into a contiguous buffer longer than the runtime's limits will result in an exception.
Removed build targets for net40, net45, net46, and netstandard1.4. Added net462.
Changed some ETW events to provide more information.
Refactored .NET events to match the information payloads of the ETW events.
GetBuffer now throws OutOfMemoryException instead of InvalidOperationException if the needed size is too large for a contiguous array.
Other Changes
Removed use of Interlocked methods when checking whether the stream is disposed. This should improve performance. (Concurrent use of streams has never been supported.)
RecyclableMemoryStream now implements IBufferWriter<byte>
New method overloads of WriteTo that allow you write the contents of the stream directly to another byte[] buffer.
Reformatted all code documentation to be more readable.
... (truncated)
Commits
667bec5 Release 2.2.0: Update version and documentation (#207)
36b471a Avoid allocating a closure in CopyToAsync (#205)
103ea02 Add GetStream overrides for ReadOnlyMemory<byte> (#201)
b9e4cd2 start with capacity zero and let EnsureCapacity set it (#204)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps Microsoft.IO.RecyclableMemoryStream from 1.4.0 to 2.2.0.
Release notes
Sourced from Microsoft.IO.RecyclableMemoryStream's releases.
... (truncated)
Changelog
Sourced from Microsoft.IO.RecyclableMemoryStream's changelog.
... (truncated)
Commits
667bec5
Release 2.2.0: Update version and documentation (#207)36b471a
Avoid allocating a closure in CopyToAsync (#205)103ea02
Add GetStream overrides for ReadOnlyMemory<byte> (#201)b9e4cd2
start with capacity zero and let EnsureCapacity set it (#204)a2ef5ed
Avoid enumerator allocations (#200)368982e
Bump Microsoft.NET.Test.Sdk from 16.10.0 to 16.11.0 in /UnitTests (#196)bad1dcc
Fix GetReadOnlySequence() throws ArgumentOutOfrangeException() (#195)e0ec4ba
Improve documentation (#192)967f533
Update README.md (#190)2e75ee1
Update to version 2.1.3; remove code analysis for pushes. (#189)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)