ReadBufferState
Advances the buffer in anticipation of a subsequent read operation.
Read from the stream until either our buffer is filled or we hit EOF.
Calling ReadCore is relatively expensive, so we minimize the number of times
we need to call it.
public ValueTask<ReadBufferState> ReadFromStreamAsync(Stream utf8Json, CancellationToken cancellationToken, bool fillBuffer = true)
Read from the stream until either our buffer is filled or we hit EOF.
Calling ReadCore is relatively expensive, so we minimize the number of times
we need to call it.