示例#1
0
 // Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250
 public static byte[] Decompress(byte[] bs)
 {
     byte[] result;
     using (MemoryStream memoryStream = new MemoryStream(bs))
     {
         result = Spks.Decompress(memoryStream);
     }
     return(result);
 }
        public async Task DownloadSPKFile(string url, string path)
        {
            var handler = new HttpClientHandler();

            if (Proxy != null)
            {
                handler.Proxy    = Proxy;
                handler.UseProxy = true;
            }

            var client = new HttpClient(handler);
            var bytes  = await client.GetByteArrayAsync(url);

            bytes = Spks.Decompress(bytes);

            File.WriteAllBytes(path, bytes);
        }