Commit 86fc159
committed
Implement Span<byte>/ReadOnlySpan<byte> overloads
Addresses #66
.NET Core 2.1 implements Read and Write overloads that accept Span
constructs. These constructs will work without overloading, but the
default implementations work via inefficient byte array copies.
This adds a netcoreapp2.1 target to the NuGet package, and implements
efficient overloads of Read(Span<byte>) and Write(ReadOnlySpan<byte>).
Overloads of ReadAsync and WriteAsync are not required, they have
efficient default implementations that will use these methods as needed.
The unit tests have also been updated to target .NET Core 2.1 so that
they can test the new method implementations.1 parent 9de4de0 commit 86fc159
File tree
5 files changed
+508
-4
lines changed- UnitTests
- src
5 files changed
+508
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
0 commit comments