Is there a BitConverter
or other class that supports .Net Core that I can read integers and other values as having Big Endian encoding?
I don't feel good about needing to write a set of helper methods:
int GetBigEndianIntegerFromByteArray(byte[] data, int startIndex) {
return (data[startIndex] << 24)
| (data[startIndex + 1] << 16)
| (data[startIndex + 2] << 8)
| data[startIndex + 3];
}