// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Collections; using System.IO; using ICSharpCode.SharpZipLib.Zip; class MainClass { public static void Main(string[] args) { ZipFile zf = new ZipFile(@"C:\temp\test.zip"); IEnumerator e = zf.GetEnumerator(); while(e.MoveNext()) { ZipEntry ze = (ZipEntry)e.Current; Stream istm = zf.GetInputStream(ze); Stream ostm = new FileStream(@"C:\temp\" + ze.Name, FileMode.CreateNew, FileAccess.Write); byte[] b = new byte[100000]; int n; while((n = istm.Read(b, 0, b.Length)) > 0) { ostm.Write(b, 0, n); } } zf.Close(); } }