private void mWorker_DoWork(object sender, DoWorkEventArgs e) { string filepath = e.Argument.ToString(); string extension = Path.GetExtension(filepath).ToLower(); // GRF? only check filetable if (extension == ".grf" || extension == ".gpf") { RoGrfFile grf = new RoGrfFile(); grf.ReadGrf(filepath, false); // skip files! byte[] buf = grf.FiletableUncompressed; Adler32.Build(buf); // cleanup asap buf = null; grf = null; } else { // other file? check full path Adler32.Build(filepath); } }