BinaryPrimitives
Reads bytes as primitives with specific endianness
Reads an Int16 out of a read-only span of bytes as big endian.
Reads an Int16 out of a read-only span of bytes as little endian.
Reads an Int32 out of a read-only span of bytes as big endian.
Reads an Int32 out of a read-only span of bytes as little endian.
Reads an Int64 out of a read-only span of bytes as big endian.
Reads an Int64 out of a read-only span of bytes as little endian.
Reads a UInt16 out of a read-only span of bytes as big endian.
Reads a UInt16 out of a read-only span of bytes as little endian.
Reads a UInt32 out of a read-only span of bytes as big endian.
Reads a UInt32 out of a read-only span of bytes as little endian.
Reads a UInt64 out of a read-only span of bytes as big endian.
Reads a UInt64 out of a read-only span of bytes as little endian.
This is a no-op and added only for consistency.
This allows the caller to read a struct of numeric primitives and reverse each field
rather than having to skip sbyte fields.
Reverses a primitive value - performs an endianness swap
Reverses a primitive value - performs an endianness swap
Reverses a primitive value - performs an endianness swap
This is a no-op and added only for consistency.
This allows the caller to read a struct of numeric primitives and reverse each field
rather than having to skip byte fields.
Reverses a primitive value - performs an endianness swap
Reverses a primitive value - performs an endianness swap
Reverses a primitive value - performs an endianness swap
Reads an Int16 out of a read-only span of bytes as big endian.
If the span is too small to contain an Int16, return false.
Reads an Int16 out of a read-only span of bytes as little endian.
If the span is too small to contain an Int16, return false.
Reads an Int32 out of a read-only span of bytes as big endian.
If the span is too small to contain an Int32, return false.
Reads an Int32 out of a read-only span of bytes as little endian.
If the span is too small to contain an Int32, return false.
Reads an Int64 out of a read-only span of bytes as big endian.
If the span is too small to contain an Int64, return false.
Reads an Int64 out of a read-only span of bytes as little endian.
If the span is too small to contain an Int64, return false.
Reads a UInt16 out of a read-only span of bytes as big endian.
If the span is too small to contain a UInt16, return false.
Reads a UInt16 out of a read-only span of bytes as little endian.
If the span is too small to contain a UInt16, return false.
Reads a UInt32 out of a read-only span of bytes as big endian.
If the span is too small to contain a UInt32, return false.
Reads a UInt32 out of a read-only span of bytes as little endian.
If the span is too small to contain a UInt32, return false.
Reads a UInt64 out of a read-only span of bytes as big endian.
If the span is too small to contain a UInt64, return false.
Reads a UInt64 out of a read-only span of bytes as little endian.
If the span is too small to contain a UInt64, return false.
Writes an Int16 into a span of bytes as big endian.
If the span is too small to contain the value, return false.
Writes an Int16 into a span of bytes as little endian.
If the span is too small to contain the value, return false.
Writes an Int32 into a span of bytes as big endian.
If the span is too small to contain the value, return false.
Writes an Int32 into a span of bytes as little endian.
If the span is too small to contain the value, return false.
Writes an Int64 into a span of bytes as big endian.
If the span is too small to contain the value, return false.
Writes an Int64 into a span of bytes as little endian.
If the span is too small to contain the value, return false.
Write a UInt16 into a span of bytes as big endian.
If the span is too small to contain the value, return false.
Write a UInt16 into a span of bytes as little endian.
If the span is too small to contain the value, return false.
Write a UInt32 into a span of bytes as big endian.
If the span is too small to contain the value, return false.
Write a UInt32 into a span of bytes as little endian.
If the span is too small to contain the value, return false.
Write a UInt64 into a span of bytes as big endian.
If the span is too small to contain the value, return false.
Write a UInt64 into a span of bytes as little endian.
If the span is too small to contain the value, return false.
Writes an Int16 into a span of bytes as big endian.
Writes an Int16 into a span of bytes as little endian.
Writes an Int32 into a span of bytes as big endian.
Writes an Int32 into a span of bytes as little endian.
Writes an Int64 into a span of bytes as big endian.
Writes an Int64 into a span of bytes as little endian.
Write a UInt16 into a span of bytes as big endian.
Write a UInt16 into a span of bytes as little endian.
Write a UInt32 into a span of bytes as big endian.
Write a UInt32 into a span of bytes as little endian.
Write a UInt64 into a span of bytes as big endian.
Write a UInt64 into a span of bytes as little endian.