dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.91k stars 4.63k forks source link

Add "static" BinaryReader-like APIs on Stream #15747

Open KrzysztofCwalina opened 8 years ago

KrzysztofCwalina commented 8 years ago

In many scenarios, there is a need to read binary data from a stream without allocating BinaryReader. See System.Resources.Reader as an example. We should add such non-allocating static reader APIs, e.g. int ReadInt32(Stream stream).

omariom commented 8 years ago

Will it be extension methods to Stream?

karelz commented 7 years ago

We need API proposal (maybe Stream is not the right place, maybe it is).

cc: @JeremyKuhne @ianhays

dotnet-policy-service[bot] commented 3 days ago

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of our issue cleanup automation.