public static bool Is1BD(byte[] bytes) { if (ToLocalEndian_Core.ToInt16FromBig(new byte[] { bytes[10], bytes[11] }) != 22016 && ToLocalEndian_Core.ToInt16FromLittle(new byte[] { bytes[10], bytes[11] }) != 22016) { return(false); } return(true); }
private bool IsBigEndian(Stream fileStream, BinaryReader binaryReader) { byte[] buffer = new byte[2]; fileStream.Seek(10, SeekOrigin.Begin); buffer = binaryReader.ReadBytes(2); if (ToLocalEndian_Core.ToInt16FromBig(buffer) == 22016) { return(true); } else { return(false); } }