Sofu Documentation
Endianness Constructor (detect)
NamespacesSofu.SofuEndiannessEndianness(array<Byte>[]()[])
Create a new encian decoder using a sofu byte order mark.
Declaration Syntax
C#
public Endianness(
	byte[] detect
)
Parameters
detect (array< Byte >[]()[])
Sofu Byte Order mark: {1, 0} = little endian, {0, 1} = big endian, {0, 0} 7 Bit
Remarks
This is only used interally by BinaryParser
Examples
CopyC#
byte[] buffer = new byte[2] { 0, 1 }; // Or read it from somewhere
Endianness endian = new Endianness(buffer); // Big Endian, This is in fact a binary sofu header part.
byte[] input = new byte[4] { 0xdd, 0x65, 0xee, 0x47 };
int i = endian.ConvertLong(input);
Console.Out.WriteLine(i); // Writes: 3714444871

Assembly: Sofu (Module: Sofu) Version: 0.2.1.0 (0.2.1.0)