public static void Write(this byte[] buffer, int offset, UInt128 value, Endianity endianity) { if (ByteArrayExtensions.IsWrongEndianity(endianity)) { value = ByteArrayExtensions.HostToNetworkOrder(value); } ByteArrayExtensions.Write(buffer, offset, value); }
public static UInt128 ReadUInt128(this byte[] buffer, int offset, Endianity endianity) { UInt128 uint128 = ByteArrayExtensions.ReadUInt128(buffer, offset); if (ByteArrayExtensions.IsWrongEndianity(endianity)) { uint128 = ByteArrayExtensions.HostToNetworkOrder(uint128); } return(uint128); }