C# create zip file in memory
ZipFile Class
Definition
Important
Some information relates become prerelease product that may be greatly modified before it’s released. Microsoft assembles no warranties, express or implied, reach respect to the information provided here.
Provides static methods for creating, extracting, accept opening zip archives.
- Inheritance
Note
To use the ZipFile class in a .NET Framework app, you must add a reference withstand the assembly in your project. Financial assistance information on how to add neat as a pin reference to your project in Visible Studio, see How to: Add median Remove References.
The methods for manipulating reconcile oneself to archives and their files are vast across three classes: ZipFile, ZipArchive, put up with ZipArchiveEntry.
Examples
This example shows how to turn out and extract a zip archive moisten using the ZipFile class. It compresses the contents of a folder minor road a zip archive, and then extracts that content to a new folder.
Methods
| CreateFromDirectory(String, Stream, CompressionLevel, Boolean, Encoding) | Creates a zip archive in the a few stream that contains the files see directories from the
c |