Open fawzibr opened 4 months ago
Tagging subscribers to this area: @dotnet/area-system-io See info in area-owners.md if you want to be subscribed.
Peak(Span<byte> buffer)
would be nice too.
BufferedStream.Peek
is part of #58216
BufferedStream.Peek
is part of #58216
Since 2021. Even though it's such a small/simple change.
Background and motivation
I don't understand why something as simple (and obvious) as PeekByte() was not added to BufferedStream. Everything is already there just removing a '++' from the ReadByte function? Maybe a Peek(byte[] arr,int offset,int count) could be possible as well.
API Proposal
API Usage
Alternative Designs
No response
Risks
No response