BinaryPrimitives BinaryPrimitives BinaryPrimitives BinaryPrimitives Class

Definition

Reads bytes as primitives with specific endianness.

public ref class BinaryPrimitives abstract sealed
public static class BinaryPrimitives
type BinaryPrimitives = class
Public Class BinaryPrimitives
Inheritance
BinaryPrimitivesBinaryPrimitivesBinaryPrimitivesBinaryPrimitives

Methods

ReadInt16BigEndian(ReadOnlySpan<Byte>) ReadInt16BigEndian(ReadOnlySpan<Byte>) ReadInt16BigEndian(ReadOnlySpan<Byte>) ReadInt16BigEndian(ReadOnlySpan<Byte>)

Reads an Int16 from the beginning of a read-only span of bytes, as big endian.

ReadInt16LittleEndian(ReadOnlySpan<Byte>) ReadInt16LittleEndian(ReadOnlySpan<Byte>) ReadInt16LittleEndian(ReadOnlySpan<Byte>) ReadInt16LittleEndian(ReadOnlySpan<Byte>)

Reads an Int16 from the beginning of a read-only span of bytes, as little endian.

ReadInt32BigEndian(ReadOnlySpan<Byte>) ReadInt32BigEndian(ReadOnlySpan<Byte>) ReadInt32BigEndian(ReadOnlySpan<Byte>) ReadInt32BigEndian(ReadOnlySpan<Byte>)

Reads an Int32 from the beginning of a read-only span of bytes, as big endian.

ReadInt32LittleEndian(ReadOnlySpan<Byte>) ReadInt32LittleEndian(ReadOnlySpan<Byte>) ReadInt32LittleEndian(ReadOnlySpan<Byte>) ReadInt32LittleEndian(ReadOnlySpan<Byte>)

Reads an Int32 from the beginning of a read-only span of bytes, as little endian.

ReadInt64BigEndian(ReadOnlySpan<Byte>) ReadInt64BigEndian(ReadOnlySpan<Byte>) ReadInt64BigEndian(ReadOnlySpan<Byte>) ReadInt64BigEndian(ReadOnlySpan<Byte>)

Reads an Int64 from the beginning of a read-only span of bytes, as big endian.

ReadInt64LittleEndian(ReadOnlySpan<Byte>) ReadInt64LittleEndian(ReadOnlySpan<Byte>) ReadInt64LittleEndian(ReadOnlySpan<Byte>) ReadInt64LittleEndian(ReadOnlySpan<Byte>)

Reads an Int64 from the beginning of a read-only span of bytes, as little endian.

ReadUInt16BigEndian(ReadOnlySpan<Byte>) ReadUInt16BigEndian(ReadOnlySpan<Byte>) ReadUInt16BigEndian(ReadOnlySpan<Byte>) ReadUInt16BigEndian(ReadOnlySpan<Byte>)

Reads a UInt16 from the beginning of a read-only span of bytes, as big endian.

ReadUInt16LittleEndian(ReadOnlySpan<Byte>) ReadUInt16LittleEndian(ReadOnlySpan<Byte>) ReadUInt16LittleEndian(ReadOnlySpan<Byte>) ReadUInt16LittleEndian(ReadOnlySpan<Byte>)

Reads a UInt16 from the beginning of a read-only span of bytes, as little endian.

ReadUInt32BigEndian(ReadOnlySpan<Byte>) ReadUInt32BigEndian(ReadOnlySpan<Byte>) ReadUInt32BigEndian(ReadOnlySpan<Byte>) ReadUInt32BigEndian(ReadOnlySpan<Byte>)

Reads a UInt32 from the beginning of a read-only span of bytes, as big endian.

ReadUInt32LittleEndian(ReadOnlySpan<Byte>) ReadUInt32LittleEndian(ReadOnlySpan<Byte>) ReadUInt32LittleEndian(ReadOnlySpan<Byte>) ReadUInt32LittleEndian(ReadOnlySpan<Byte>)

Reads a UInt32 from the beginning of a read-only span of bytes, as little endian.

ReadUInt64BigEndian(ReadOnlySpan<Byte>) ReadUInt64BigEndian(ReadOnlySpan<Byte>) ReadUInt64BigEndian(ReadOnlySpan<Byte>) ReadUInt64BigEndian(ReadOnlySpan<Byte>)

Reads a UInt64 from the beginning of a read-only span of bytes, as big endian.

ReadUInt64LittleEndian(ReadOnlySpan<Byte>) ReadUInt64LittleEndian(ReadOnlySpan<Byte>) ReadUInt64LittleEndian(ReadOnlySpan<Byte>) ReadUInt64LittleEndian(ReadOnlySpan<Byte>)

Reads a UInt64 from the beginning of a read-only span of bytes, as little endian.

ReverseEndianness(UInt64) ReverseEndianness(UInt64) ReverseEndianness(UInt64) ReverseEndianness(UInt64)

Reverses a primitive value by performing an endianness swap of the specified UInt64 value.

ReverseEndianness(UInt32) ReverseEndianness(UInt32) ReverseEndianness(UInt32) ReverseEndianness(UInt32)

Reverses a primitive value by performing an endianness swap of the specified UInt32 value.

ReverseEndianness(UInt16) ReverseEndianness(UInt16) ReverseEndianness(UInt16) ReverseEndianness(UInt16)

Reverses a primitive value by performing an endianness swap of the specified UInt16 value.

ReverseEndianness(SByte) ReverseEndianness(SByte) ReverseEndianness(SByte) ReverseEndianness(SByte)

Reverses a primitive value by performing an endianness swap of the specified SByte value, which effectively does nothing for an SByte.

ReverseEndianness(Int16) ReverseEndianness(Int16) ReverseEndianness(Int16) ReverseEndianness(Int16)

Reverses a primitive value by performing an endianness swap of the specified Int16 value.

ReverseEndianness(Int32) ReverseEndianness(Int32) ReverseEndianness(Int32) ReverseEndianness(Int32)

Reverses a primitive value by performing an endianness swap of the specified Int32 value.

ReverseEndianness(Byte) ReverseEndianness(Byte) ReverseEndianness(Byte) ReverseEndianness(Byte)

Reverses a primitive value by performing an endianness swap of the specified Byte value, which effectively does nothing for a Byte.

ReverseEndianness(Int64) ReverseEndianness(Int64) ReverseEndianness(Int64) ReverseEndianness(Int64)

Reverses a primitive value by performing an endianness swap of the specified Int64 value.

TryReadInt16BigEndian(ReadOnlySpan<Byte>, Int16) TryReadInt16BigEndian(ReadOnlySpan<Byte>, Int16) TryReadInt16BigEndian(ReadOnlySpan<Byte>, Int16) TryReadInt16BigEndian(ReadOnlySpan<Byte>, Int16)

Reads an Int16 from the beginning of a read-only span of bytes, as big endian.

TryReadInt16LittleEndian(ReadOnlySpan<Byte>, Int16) TryReadInt16LittleEndian(ReadOnlySpan<Byte>, Int16) TryReadInt16LittleEndian(ReadOnlySpan<Byte>, Int16) TryReadInt16LittleEndian(ReadOnlySpan<Byte>, Int16)

Reads an Int16 from the beginning of a read-only span of bytes, as little endian.

TryReadInt32BigEndian(ReadOnlySpan<Byte>, Int32) TryReadInt32BigEndian(ReadOnlySpan<Byte>, Int32) TryReadInt32BigEndian(ReadOnlySpan<Byte>, Int32) TryReadInt32BigEndian(ReadOnlySpan<Byte>, Int32)

Reads an Int32 from the beginning of a read-only span of bytes, as big endian.

TryReadInt32LittleEndian(ReadOnlySpan<Byte>, Int32) TryReadInt32LittleEndian(ReadOnlySpan<Byte>, Int32) TryReadInt32LittleEndian(ReadOnlySpan<Byte>, Int32) TryReadInt32LittleEndian(ReadOnlySpan<Byte>, Int32)

Reads an Int32 from the beginning of a read-only span of bytes, as little endian.

TryReadInt64BigEndian(ReadOnlySpan<Byte>, Int64) TryReadInt64BigEndian(ReadOnlySpan<Byte>, Int64) TryReadInt64BigEndian(ReadOnlySpan<Byte>, Int64) TryReadInt64BigEndian(ReadOnlySpan<Byte>, Int64)

Reads an Int64 from the beginning of a read-only span of bytes, as big endian.

TryReadInt64LittleEndian(ReadOnlySpan<Byte>, Int64) TryReadInt64LittleEndian(ReadOnlySpan<Byte>, Int64) TryReadInt64LittleEndian(ReadOnlySpan<Byte>, Int64) TryReadInt64LittleEndian(ReadOnlySpan<Byte>, Int64)

Reads an Int64 from the beginning of a read-only span of bytes, as little endian.

TryReadUInt16BigEndian(ReadOnlySpan<Byte>, UInt16) TryReadUInt16BigEndian(ReadOnlySpan<Byte>, UInt16) TryReadUInt16BigEndian(ReadOnlySpan<Byte>, UInt16) TryReadUInt16BigEndian(ReadOnlySpan<Byte>, UInt16)

Reads a UInt16 from the beginning of a read-only span of bytes, as big endian.

TryReadUInt16LittleEndian(ReadOnlySpan<Byte>, UInt16) TryReadUInt16LittleEndian(ReadOnlySpan<Byte>, UInt16) TryReadUInt16LittleEndian(ReadOnlySpan<Byte>, UInt16) TryReadUInt16LittleEndian(ReadOnlySpan<Byte>, UInt16)

Reads a UInt16 from the beginning of a read-only span of bytes, as little endian.

TryReadUInt32BigEndian(ReadOnlySpan<Byte>, UInt32) TryReadUInt32BigEndian(ReadOnlySpan<Byte>, UInt32) TryReadUInt32BigEndian(ReadOnlySpan<Byte>, UInt32) TryReadUInt32BigEndian(ReadOnlySpan<Byte>, UInt32)

Reads a UInt32 from the beginning of a read-only span of bytes, as big endian.

TryReadUInt32LittleEndian(ReadOnlySpan<Byte>, UInt32) TryReadUInt32LittleEndian(ReadOnlySpan<Byte>, UInt32) TryReadUInt32LittleEndian(ReadOnlySpan<Byte>, UInt32) TryReadUInt32LittleEndian(ReadOnlySpan<Byte>, UInt32)

Reads a UInt32 from the beginning of a read-only span of bytes, as little endian.

TryReadUInt64BigEndian(ReadOnlySpan<Byte>, UInt64) TryReadUInt64BigEndian(ReadOnlySpan<Byte>, UInt64) TryReadUInt64BigEndian(ReadOnlySpan<Byte>, UInt64) TryReadUInt64BigEndian(ReadOnlySpan<Byte>, UInt64)

Reads a UInt64 from the beginning of a read-only span of bytes, as big endian.

TryReadUInt64LittleEndian(ReadOnlySpan<Byte>, UInt64) TryReadUInt64LittleEndian(ReadOnlySpan<Byte>, UInt64) TryReadUInt64LittleEndian(ReadOnlySpan<Byte>, UInt64) TryReadUInt64LittleEndian(ReadOnlySpan<Byte>, UInt64)

Reads a UInt64 from the beginning of a read-only span of bytes, as little endian.

TryWriteInt16BigEndian(Span<Byte>, Int16) TryWriteInt16BigEndian(Span<Byte>, Int16) TryWriteInt16BigEndian(Span<Byte>, Int16) TryWriteInt16BigEndian(Span<Byte>, Int16)

Writes an Int16 into a span of bytes, as big endian.

TryWriteInt16LittleEndian(Span<Byte>, Int16) TryWriteInt16LittleEndian(Span<Byte>, Int16) TryWriteInt16LittleEndian(Span<Byte>, Int16) TryWriteInt16LittleEndian(Span<Byte>, Int16)

Writes an Int16 into a span of bytes, as little endian.

TryWriteInt32BigEndian(Span<Byte>, Int32) TryWriteInt32BigEndian(Span<Byte>, Int32) TryWriteInt32BigEndian(Span<Byte>, Int32) TryWriteInt32BigEndian(Span<Byte>, Int32)

Writes an Int32 into a span of bytes, as big endian.

TryWriteInt32LittleEndian(Span<Byte>, Int32) TryWriteInt32LittleEndian(Span<Byte>, Int32) TryWriteInt32LittleEndian(Span<Byte>, Int32) TryWriteInt32LittleEndian(Span<Byte>, Int32)

Writes an Int32 into a span of bytes, as little endian.

TryWriteInt64BigEndian(Span<Byte>, Int64) TryWriteInt64BigEndian(Span<Byte>, Int64) TryWriteInt64BigEndian(Span<Byte>, Int64) TryWriteInt64BigEndian(Span<Byte>, Int64)

Writes an Int64 into a span of bytes, as big endian.

TryWriteInt64LittleEndian(Span<Byte>, Int64) TryWriteInt64LittleEndian(Span<Byte>, Int64) TryWriteInt64LittleEndian(Span<Byte>, Int64) TryWriteInt64LittleEndian(Span<Byte>, Int64)

Writes an Int64 into a span of bytes, as little endian.

TryWriteUInt16BigEndian(Span<Byte>, UInt16) TryWriteUInt16BigEndian(Span<Byte>, UInt16) TryWriteUInt16BigEndian(Span<Byte>, UInt16) TryWriteUInt16BigEndian(Span<Byte>, UInt16)

Writes a UInt16 into a span of bytes, as big endian.

TryWriteUInt16LittleEndian(Span<Byte>, UInt16) TryWriteUInt16LittleEndian(Span<Byte>, UInt16) TryWriteUInt16LittleEndian(Span<Byte>, UInt16) TryWriteUInt16LittleEndian(Span<Byte>, UInt16)

Writes a UInt16 into a span of bytes, as little endian.

TryWriteUInt32BigEndian(Span<Byte>, UInt32) TryWriteUInt32BigEndian(Span<Byte>, UInt32) TryWriteUInt32BigEndian(Span<Byte>, UInt32) TryWriteUInt32BigEndian(Span<Byte>, UInt32)

Writes a UInt32 into a span of bytes, as big endian.

TryWriteUInt32LittleEndian(Span<Byte>, UInt32) TryWriteUInt32LittleEndian(Span<Byte>, UInt32) TryWriteUInt32LittleEndian(Span<Byte>, UInt32) TryWriteUInt32LittleEndian(Span<Byte>, UInt32)

Writes a UInt32 into a span of bytes, as little endian.

TryWriteUInt64BigEndian(Span<Byte>, UInt64) TryWriteUInt64BigEndian(Span<Byte>, UInt64) TryWriteUInt64BigEndian(Span<Byte>, UInt64) TryWriteUInt64BigEndian(Span<Byte>, UInt64)

Writes a UInt64 into a span of bytes, as big endian.

TryWriteUInt64LittleEndian(Span<Byte>, UInt64) TryWriteUInt64LittleEndian(Span<Byte>, UInt64) TryWriteUInt64LittleEndian(Span<Byte>, UInt64) TryWriteUInt64LittleEndian(Span<Byte>, UInt64)

Writes a UInt64 into a span of bytes, as little endian.

WriteInt16BigEndian(Span<Byte>, Int16) WriteInt16BigEndian(Span<Byte>, Int16) WriteInt16BigEndian(Span<Byte>, Int16) WriteInt16BigEndian(Span<Byte>, Int16)

Writes an Int16 into a span of bytes, as big endian.

WriteInt16LittleEndian(Span<Byte>, Int16) WriteInt16LittleEndian(Span<Byte>, Int16) WriteInt16LittleEndian(Span<Byte>, Int16) WriteInt16LittleEndian(Span<Byte>, Int16)

Writes an Int16 into a span of bytes, as little endian.

WriteInt32BigEndian(Span<Byte>, Int32) WriteInt32BigEndian(Span<Byte>, Int32) WriteInt32BigEndian(Span<Byte>, Int32) WriteInt32BigEndian(Span<Byte>, Int32)

Writes an Int32 into a span of bytes, as big endian.

WriteInt32LittleEndian(Span<Byte>, Int32) WriteInt32LittleEndian(Span<Byte>, Int32) WriteInt32LittleEndian(Span<Byte>, Int32) WriteInt32LittleEndian(Span<Byte>, Int32)

Writes an Int32 into a span of bytes, as little endian.

WriteInt64BigEndian(Span<Byte>, Int64) WriteInt64BigEndian(Span<Byte>, Int64) WriteInt64BigEndian(Span<Byte>, Int64) WriteInt64BigEndian(Span<Byte>, Int64)

Writes an Int64 into a span of bytes, as big endian.

WriteInt64LittleEndian(Span<Byte>, Int64) WriteInt64LittleEndian(Span<Byte>, Int64) WriteInt64LittleEndian(Span<Byte>, Int64) WriteInt64LittleEndian(Span<Byte>, Int64)

Writes an Int64 into a span of bytes, as little endian.

WriteUInt16BigEndian(Span<Byte>, UInt16) WriteUInt16BigEndian(Span<Byte>, UInt16) WriteUInt16BigEndian(Span<Byte>, UInt16) WriteUInt16BigEndian(Span<Byte>, UInt16)

Writes a UInt16 into a span of bytes, as big endian.

WriteUInt16LittleEndian(Span<Byte>, UInt16) WriteUInt16LittleEndian(Span<Byte>, UInt16) WriteUInt16LittleEndian(Span<Byte>, UInt16) WriteUInt16LittleEndian(Span<Byte>, UInt16)

Writes a UInt16 into a span of bytes, as little endian.

WriteUInt32BigEndian(Span<Byte>, UInt32) WriteUInt32BigEndian(Span<Byte>, UInt32) WriteUInt32BigEndian(Span<Byte>, UInt32) WriteUInt32BigEndian(Span<Byte>, UInt32)

Writes a UInt32 into a span of bytes, as big endian.

WriteUInt32LittleEndian(Span<Byte>, UInt32) WriteUInt32LittleEndian(Span<Byte>, UInt32) WriteUInt32LittleEndian(Span<Byte>, UInt32) WriteUInt32LittleEndian(Span<Byte>, UInt32)

Writes a UInt32 into a span of bytes, as little endian.

WriteUInt64BigEndian(Span<Byte>, UInt64) WriteUInt64BigEndian(Span<Byte>, UInt64) WriteUInt64BigEndian(Span<Byte>, UInt64) WriteUInt64BigEndian(Span<Byte>, UInt64)

Writes a UInt64 into a span of bytes, as big endian.

WriteUInt64LittleEndian(Span<Byte>, UInt64) WriteUInt64LittleEndian(Span<Byte>, UInt64) WriteUInt64LittleEndian(Span<Byte>, UInt64) WriteUInt64LittleEndian(Span<Byte>, UInt64)

Writes a UInt64 into a span of bytes, as little endian.

Applies to