XmobiTea.Binary 1.0.4

dotnet add package XmobiTea.Binary --version 1.0.4                
NuGet\Install-Package XmobiTea.Binary -Version 1.0.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XmobiTea.Binary" Version="1.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XmobiTea.Binary --version 1.0.4                
#r "nuget: XmobiTea.Binary, 1.0.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XmobiTea.Binary as a Cake Addin
#addin nuget:?package=XmobiTea.Binary&version=1.0.4

// Install XmobiTea.Binary as a Cake Tool
#tool nuget:?package=XmobiTea.Binary&version=1.0.4                

XmobiTea.Binary

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.

Installation

To install XmobiTea.Binary via NuGet, run the following command:

dotnet add package XmobiTea.Binary

Features

  • High Performance: Optimized for fast serialization and deserialization of objects.
  • Flexible API: Simple and intuitive API for converting objects and collections.
  • Custom Type Support: Easily extend the library to support custom types and structures.
  • Integration: Seamlessly integrates with other XmobiTea libraries for enhanced functionality.

Usage

Serialization

You can serialize an object to binary data using the DataConverter:

    var myObject = new MyCustomObject();
    var binaryData = DataConverter.SerializeObject(myObject);

Deserialization

To deserialize binary data back into an object:

    var binaryData = /* your binary data */;
    var deserializedObject = DataConverter.DeserializeObject<MyCustomObject>(binaryData);

Working with Arrays

Serialization and deserialization of arrays or lists is also straightforward:

    var myArray = new List<MyCustomObject> { new MyCustomObject(), new MyCustomObject() };
    var binaryArray = DataConverter.SerializeArray(myArray);

    var deserializedArray = DataConverter.DeserializeArray<MyCustomObject>(binaryArray);

Custom Binary Readers and Writers

If you need to handle custom data types, you can create custom binary readers and writers:

    public class MyCustomObjectBinaryReader : BinaryReader<MyCustomObject>
    {
        public override MyCustomObject Read(Stream stream)
        {
            // Custom deserialization logic here
        }
    }

Extending the Data Converter

For advanced scenarios, you can extend the IDataConverter to implement custom serialization logic:

    public class MyCustomDataConverter : IDataConverter
    {
        // Implement custom serialization and deserialization methods
    }

Supported Data Types

XmobiTea.Binary supports a wide range of data types, including:

  • Primitive types: int, byte, bool, char, etc.
  • Collections: IList, IDictionary, etc.
  • Custom objects

Extensibility

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.

Contributing

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.

License

XmobiTea.Binary is licensed under the Apache License 2.0. For more information, see the LICENSE file.

Acknowledgments

XmobiTea.Binary is part of the XmobiTea suite of libraries, providing efficient and scalable solutions for modern .NET applications.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net46 is compatible.  net461 is compatible.  net462 is compatible.  net463 was computed.  net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETFramework 4.6

    • No dependencies.
  • .NETFramework 4.6.1

    • No dependencies.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETFramework 4.7

    • No dependencies.
  • .NETFramework 4.7.1

    • No dependencies.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • .NETFramework 4.8.1

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net6.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on XmobiTea.Binary:

Package Downloads
XmobiTea.Binary.SimplePack

XmobiTea.Binary.SimplePack serves as an implement dedicated to the serialization and deserialization of data using the SimplePack format.

XmobiTea.ProtonNet.RpcProtocol

XmobiTea.ProtonNet.RpcProtocol is responsible for encoding, decoding, and transforming XmobiTea.ProtonNet.Networking objects into the specific objects required by the server and client. This ensures seamless communication and interaction between different components within the ProtonNet framework.

XmobiTea.Binary.MessagePack

XmobiTea.Binary.MessagePack serves as an implement dedicated to the serialization and deserialization of data using the MessagePack format.

XmobiTea.ProtonNet.Token

XmobiTea.ProtonNet.Token provides methods for handling Proton tokens, which are a type of token managed by the ProtonServer. These methods ensure that tokens are processed securely and efficiently, facilitating authentication and session management within the ProtonNet ecosystem.

XmobiTea.ProtonNet.Server

XmobiTea.ProtonNet.Server is core of both SocketServer and WebApiServer.

GitHub repositories

This package is not used by any popular GitHub repositories.