private void ExtractFileLocal(MD5Hash key, string path, string name) { Stream stream = GetLocalDataStream(key); using (BLTEStream blte = new BLTEStream(stream, key)) blte.ExtractToFile(path, name); }
private void ExtractFileOnline(MD5Hash key, string path, string name) { IndexEntry entry = CDNIndex.GetIndexInfo(key); if (entry != null) { using (Stream s = CDNIndex.OpenDataFile(entry)) using (BLTEStream blte = new BLTEStream(s, key)) { blte.ExtractToFile(path, name); } } else { using (Stream s = CDNIndex.OpenDataFileDirect(key)) using (BLTEStream blte = new BLTEStream(s, key)) { blte.ExtractToFile(path, name); } } }