Just a note: The BitConverter.Get... and BitConverter.To.. will force the Indianness to the system architecture Indianness (not a problem if that is littleIndian) but in systems using BigIndian the conversion will be done in BigIndian.
System.Buffers.Binary.BinaryPrimitives provides methods for explicitly converting to from bytes in the desired Indianness format. (ReadInt32LittleEndian, WriteInt32LittleEndian).
From https://github.com/SeppPenner/SparkplugNet/commit/2c0454f931eaecab051f0cb058a8cff4d58bb6f3#commitcomment-138925118: