Example #1
0
        private void ExtractFileLocal(MD5Hash key, string path, string name)
        {
            Stream stream = GetLocalDataStream(key);

            using (BLTEStream blte = new BLTEStream(stream, key))
                blte.ExtractToFile(path, name);
        }
Example #2
0
        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);
                    }
            }
        }
Example #3
0
 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);
         }
     }
 }
Example #4
0
 private void ExtractFileLocal(MD5Hash key, string path, string name)
 {
     Stream stream = GetLocalDataStream(key);
     using (BLTEStream blte = new BLTEStream(stream, key))
         blte.ExtractToFile(path, name);
 }