public int GetInt(byte[] buff, int pos) { if (pos < 0 || pos > buff.Length - 4) return 0; return BitConverter.ToInt32(buff, pos); }