public static DBPFFile LoadResource(string file, bool isDownload = false) { var res = new DBPFFile(); res.fname = file; var stream = File.OpenRead(file); res.Read(stream, true, isDownload); return(res); }