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
<PackageReference Include="nanoFramework.System.Buffers.Helpers" Version="1.0.1" />
paket add nanoFramework.System.Buffers.Helpers --version 1.0.1
#r "nuget: nanoFramework.System.Buffers.Helpers, 1.0.1"
// 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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
-
- nanoFramework.CoreLibrary (>= 1.15.5)
- nanoFramework.System.Buffers.Binary.BinaryPrimitives (>= 1.2.699)
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 |