System.IO.Compression Namespace Home
This page is specific to:.NET Framework Version:2.03.03.54.0
.NET Framework Class Library
System.IO.Compression Namespace

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

Classes

  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.
Enumerations

  EnumerationDescription
Public enumerationCompressionMode Specifies whether to compress or decompress the underlying stream.
Community Content

See Also: System.IO.Packaging
Added by:consimi

For working with Archive files see System.IO.Packaging

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

If you want to manipulate ZIP files...
Added by:drewster999
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.
ZipStorer: A Pure C# Class to Store Files in Zip
Added by:Thomas Lee
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.
© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View