should be from/to TCP protocol format (always big-Endian) to execution engine based on processor architecture. See System.BitConverter class ():
The endianness of an architecture is indicated by the IsLittleEndian property, which returns true on little-endian systems and false on big-endian systems. On little-endian systems, lower-order bytes precede higher-order bytes. On big-endian system, higher-order bytes precede lower-order bytes.
Recomended use BinaryPrimitives.WriteInt32BigEndian/ReadInt32BigEndian class from nuget System.Memory by Microsoft for NetStandard 2.0.