Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
System.IO.Compression Namespace

The System.IO.Compression namespace contains classes that provide basic compression and decompression services for streams.

  ClassDescription
Public classDeflateStreamProvides methods and properties for compressing and decompressing streams using the Deflate algorithm.
Public classGZipStreamProvides methods and properties used to compress and decompress streams.
  EnumerationDescription
Public enumerationCompressionMode Specifies whether to compress or decompress the underlying stream.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
See Also: System.IO.Packaging      Marvin Bobo ... consimi   |   Edit   |   Show History

For working with Archive files see System.IO.Packaging

http://msdn.microsoft.com/en-us/library/system.io.packaging.aspx

Tags What's this?: Add a tag
Flag as ContentBug
If you want to manipulate ZIP files...      cheeso ... drewster999   |   Edit   |   Show History
The classes in this namespace won't suffice. You can do some things with System.IO.Packaging, but it is not intuitive or easy. There's a nice, free third party library though, that will let you create, read, extract, and update ZIP files. DotNetZip.
http://DotNetZip.codeplex.com

It does regular ZIP files very easily. You can create or read ZIP files in WinForms apps, WPF apps, ASP.NET apps, mobile device apps, and more. It works with VB or C# or any .NET language. It's fully managed code. A single DLL. It supports Unicode, password protection, AES, streaming, ZIP64, file and archive comments, and more stuff. You can add or extract files by name. Or by wildcard. You can add or extract files based on file attributes, file size, or even file time. It has an easy-to-use eventing model. Full documentation in chm format. And the compression is very good.

There's even a nifty little GUI tool that you can use to create zip files. It's a good replacement for WinZip - all based on the DotNetZip library.

Check it out.
Tags What's this?: cool (x) Add a tag
Flag as ContentBug
ZipStorer: A Pure C# Class to Store Files in Zip      jaime_olivares ... Thomas Lee   |   Edit   |   Show History
Notice DeflateStream cannot read/write a .zip file directly (neither GZipStream).

ZipStorer library provides support for Zip files for the .NET and .NET Compact Frameworks in a simple and monolithic class: http://zipstorer.codeplex.com

Also non-compressed storage support for Silverlight.
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker