A generic, extensible binary reader for .NET
Effortlessly read from files, streams, buffers, or spans with a single unified API.
Install via NuGet:
Install-Package GenericReader- Read from files, streams, buffers, and spans
- Generic
Read<T>()API for simplicity and flexibility - Lightweight and easy to integrate
usingGenericReader;// From fileusingvarfileReader=newGenericFileReader(@"C:\Test\Example.bin");varnumberFromFile=fileReader.Read<uint>();// From streamusingvarstreamReader=newGenericStreamReader(GetStream());varnumberFromStream=streamReader.Read<uint>();// From byte arrayusingvarbufferReader=newGenericBufferReader(GetBuffer());varnumberFromBuffer=bufferReader.Read<uint>();// From spanvarspanReader=newGenericSpanReader(GetSpan());varnumberFromSpan=spanReader.Read<uint>();Contributions are welcome and appreciated!
Whether it's fixing a typo, suggesting an improvement, or submitting a pull request — every bit helps.
This project is licensed under the MIT License.
⭐️ Star the repo if you find it useful!
Feel free to open an issue if you have any questions or feedback.