public static uint DecodeUInt32(byte[] buffer, ref int offset) { var value = Bits.ToUInt32(buffer, offset); offset += 4; return value; }