CSharp examples for System.IO.Compression:Zip
UnZip Binary byte array
using System.Text; using System.IO.Compression; using System.IO;/* www . j a va 2 s.c o m*/ using System.Collections.Generic; using System; public class Main{ public static byte[] UnZipBinary(byte[] compressedSource) { byte[] unpackedContent = new byte[compressedSource.Length * 20]; memSource = new MemoryStream(compressedSource); gzipStream = new GZipStream(memSource, CompressionMode.Decompress); var readedBytes = gzipStream.Read(unpackedContent, 0, unpackedContent.Length); memDestination = new MemoryStream(unpackedContent, 0, readedBytes); return memDestination.ToArray(); } }