示例#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);
            }
        }
示例#2
0
 protected void ExtractFileOnlineInternal(IndexEntry idxInfo, MD5Hash key, string path, string name)
 {
     if (idxInfo != null)
     {
         using (Stream s = CDNIndex.OpenDataFile(idxInfo))
             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);
             }
     }
 }