Ejemplo n.º 1
0
 public static void DeCompressFromByte(string targetPath, byte[] content)
 {
     using (MemoryStream ms = new MemoryStream(content))
     {
         CompressHelper.DeCompress(targetPath, ms);
     }
 }
Ejemplo n.º 2
0
 public static void DeCompressFromFile(string zipPath, string targetPath)
 {
     if (File.Exists(zipPath))
     {
         using (FileStream fStream = File.Open(zipPath, FileMode.Open))
         {
             using (MemoryStream ms = new MemoryStream())
             {
                 byte[] array = new byte[4096];
                 int    count;
                 while ((count = fStream.Read(array, 0, array.Length)) != 0)
                 {
                     ms.Write(array, 0, count);
                 }
                 CompressHelper.DeCompress(targetPath, ms);
             }
         }
     }
 }