public static short ReadShort(this byte[] buffer, int offset, Endianity endianity)
        {
            short num = ByteArrayExtensions.ReadShort(buffer, offset);

            if (ByteArrayExtensions.IsWrongEndianity(endianity))
            {
                num = ShortExtensions.ReverseEndianity(num);
            }
            return(num);
        }
 public static ushort ReadUShort(this byte[] buffer, int offset, Endianity endianity)
 {
     return((ushort)ByteArrayExtensions.ReadShort(buffer, offset, endianity));
 }