Std.ByteOrder
19 public declarations
- bswap16
UInt16 -> UInt16Reverses the bytes of a 16-bit unsigned integer.
- bswap32
UInt32 -> UInt32Reverses the bytes of a 32-bit unsigned integer.
- bswap64
UInt64 -> UInt64Reverses the bytes of a 64-bit unsigned integer.
- htonl
UInt32 -> UInt32Converts a 32-bit host integer to network byte order (Big-Endian).
- htons
UInt16 -> UInt16Converts a 16-bit host integer to network byte order (Big-Endian).
- ntohl
UInt32 -> UInt32Converts a 32-bit network byte order integer to host byte order.
- ntohs
UInt16 -> UInt16Converts a 16-bit network byte order integer to host byte order.
- readU16BE
&Array[UInt8] -> Int -> Option[UInt16]Reads a 16-bit big-endian unsigned integer from `bytes` at `offset`.
- readU16LE
&Array[UInt8] -> Int -> Option[UInt16]Reads a 16-bit little-endian unsigned integer from `bytes` at `offset`.
- readU32BE
&Array[UInt8] -> Int -> Option[UInt32]Reads a 32-bit big-endian unsigned integer from `bytes` at `offset`.
- readU32LE
&Array[UInt8] -> Int -> Option[UInt32]Reads a 32-bit little-endian unsigned integer from `bytes` at `offset`.
- readU64BE
&Array[UInt8] -> Int -> Option[UInt64]Reads a 64-bit big-endian unsigned integer from `bytes` at `offset`.
- readU64LE
&Array[UInt8] -> Int -> Option[UInt64]Reads a 64-bit little-endian unsigned integer from `bytes` at `offset`.
- writeU16BE
UInt16 -> Array[UInt8]Serializes a 16-bit word into 2 big-endian bytes.
- writeU16LE
UInt16 -> Array[UInt8]Serializes a 16-bit word into 2 little-endian bytes.
- writeU32BE
UInt32 -> Array[UInt8]Serializes a 32-bit word into 4 big-endian bytes.
- writeU32LE
UInt32 -> Array[UInt8]Serializes a 32-bit word into 4 little-endian bytes.
- writeU64BE
UInt64 -> Array[UInt8]Serializes a 64-bit word into 8 big-endian bytes.
- writeU64LE
UInt64 -> Array[UInt8]Serializes a 64-bit word into 8 little-endian bytes.
