private static Int16 getShortFromByteArray(byte[] bytes, int index)
{
byte[] int16InBytes = new byte[2];
Array.Copy(bytes, index, int16InBytes, 0, 2);
//
// TODO: after some checking remove
//
// MSDN states that we should check architecture but I found that the values in the byte array are
// in the correct order
//
// If the system architecture is little-endian (that is, little end first),
// reverse the byte array.
/*
if (BitConverter.IsLittleEndian)
Array.Reverse(intInBytes);
*/
return BitConverter.ToInt16(int16InBytes, 0);
}