private static bool ContainsBluRayStartSegment(byte[] buffer) { const int epochStart = 0x80; var position = 0; while (position + 3 <= buffer.Length) { var segmentType = buffer[position]; if (segmentType == epochStart) { return(true); } var length = BluRaySupParser.BigEndianInt16(buffer, position + 1) + 3; position += length; } return(false); }