private static short ReadInt16(byte[] buffer, int pos) { return (short) ((((int)buffer[pos + 1]) << 8) | ((int)buffer[pos] & 0xff)); }