dahomey-technologies / Dahomey.Cbor

High-performance CBOR (RFC 8949) serialization framework for .Net (C#)
MIT License
81 stars 14 forks source link

Feature request: Add ReadOnlySequence<byte> overload to CborReader #99

Closed rmja closed 1 year ago

rmja commented 2 years ago

The current implementation of CborReader takes a Span<byte> of memory as the buffer. This however enforces that the data must be in one consecutive piece of memory. Adding support for ReadOnlySequence<byte> would allow for operation on fragment cbor memory which is really useful when the cbor data is large.

Maybe some inspiration can be found in Utf8JsonReader.