![]() |
ProtonNet Server 1.0
An Open Solution for all your socket or web api needs.
|
XmobiTea.Binary is a high-performance binary serialization and deserialization library for .NET applications. It offers a flexible and efficient way to convert objects to binary data and vice versa, making it ideal for scenarios where performance and data size are critical.
To install XmobiTea.Binary via NuGet, run the following command:
dotnet add package XmobiTea.Binary
You can serialize an object to binary data using the DataConverter:
To deserialize binary data back into an object:
Serialization and deserialization of arrays or lists is also straightforward:
If you need to handle custom data types, you can create custom binary readers and writers:
For advanced scenarios, you can extend the IDataConverter to implement custom serialization logic:
XmobiTea.Binary supports a wide range of data types, including:
The library is designed with extensibility in mind. You can implement your own readers and writers to handle specific binary data formats or custom types not covered by the default implementation.
We welcome contributions to XmobiTea.Binary! If you'd like to contribute, please fork the repository, create a new branch, and submit a pull request.
XmobiTea.Binary is licensed under the Apache License 2.0. For more information, see the LICENSE file.
XmobiTea.Binary is part of the XmobiTea suite of libraries, providing efficient and scalable solutions for modern .NET applications.