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.
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 forReadOnlySequence<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.