nanoFramework.System.Buffers.Helpers 1.0.1

Prefix Reserved
dotnet add package nanoFramework.System.Buffers.Helpers --version 1.0.1                
NuGet\Install-Package nanoFramework.System.Buffers.Helpers -Version 1.0.1                
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="nanoFramework.System.Buffers.Helpers" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add nanoFramework.System.Buffers.Helpers --version 1.0.1                
#r "nuget: nanoFramework.System.Buffers.Helpers, 1.0.1"                
#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 nanoFramework.System.Buffers.Helpers as a Cake Addin
#addin nuget:?package=nanoFramework.System.Buffers.Helpers&version=1.0.1

// Install nanoFramework.System.Buffers.Helpers as a Cake Tool
#tool nuget:?package=nanoFramework.System.Buffers.Helpers&version=1.0.1                

System.Buffers.Helpers

Contains an IBitConverter interface with both Big and Little Endian implementations. Comes in utile when received data is encoded in another Endian way. Examples are:

  • Networking data which is encoded in Big Endian. Hence when reading or writing UDP or TCP packets the data needs to be decoded or encoded with a Big Endian converter.
  • Serialized data could be encoded in one Endian way or another. Hence the data needs to be read with the appropriate converter.

Suppose a byte[] is received which contains a double. The transmitter of the data could be Big or Little Endian encoded. The IBitConverter allows to use the implementation as needed:

    internal class SerializationComponent
    {
        private readonly IBitConverter bitConverter;

        public SerializationComponent(bool dataIsLittleEndian)
        {
            bitConverter = dataIsLittleEndian ? EndianBitConverter.Little : EndianBitConverter.Big;
        }

        public double ReceivedDoubleInData(byte[] data)
        {
            return bitConverter.ToDouble(data);
        }
    }
Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on nanoFramework.System.Buffers.Helpers:

Package Downloads
nanoFramework.Iot.Device.MulticastDns

This package includes the .NET IoT Core binding Iot.Device.MulticastDns for .NET nanoFramework C# projects.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 130 12/19/2024