BinaryData
When parsing or storing data of binary file formats or protocols, the default .NET functionality is often insufficient. Classes like BinaryReader or BinaryWriter lack support for a different byte order (endianness) than the system one. Strings are typically stored with a length-prefix other than common 0 terminating bytes. Navigation inside Stream instances may be uncomfortable.
The Syroot.BinaryData libraries fill these gaps by providing the following features:
- Different byte order (endianness), supporting big and little endian the same way.
- Many
Stringformats like 0-termianted strings or UInt16 length prefixes. - Several
BooleanandDateTimeformats (like 4-byte booleans or CTime'stime_tinteger). - Strongly typed support for saving enum values and checking them for validity.
- Performant and simple parsing of data available in
(ReadOnly)Span<byte>instances. - Advanced
Streamnavigation features like temporary seeks, simulated seeks, or (negative) alignments. - Serializing and deserializing any class into a binary format.
A quick feature tour is given in the following articles. For the full API documentation, consult the reference from the navigation bar on the left.