Assembly: System.IO.Compression.FileSystem (in System.IO.Compression.FileSystem.dll)
|CreateEntryFromFile(ZipArchive, String, String)|
Archives a file by compressing it and adding it to the zip archive.
|CreateEntryFromFile(ZipArchive, String, String, CompressionLevel)|
Archives a file by compressing it using the specified compression level and adding it to the zip archive.
Extracts all the files in the zip archive to a directory on the file system.
Extracts an entry in the zip archive to a file.
|ExtractToFile(ZipArchiveEntry, String, Boolean)|
Extracts an entry in the zip archive to a file, and optionally overwrites an existing file that has the same name.
To use the extension methods, you must reference the System.IO.Compression.FileSystem assembly in your project. The System.IO.Compression.FileSystem assembly is not available in Windows 8.x Store apps. Therefore, the ZipFile classes (both of which are in the System.IO.Compression.FileSystem assembly) are not available in Windows 8.x Store apps. In Windows 8.x Store apps, you work with compressed files by using the methods in ZipArchive, ZipArchiveEntry, DeflateStream, and GZipStream.and
The ZipArchive:class contains three methods that extend
The ZipArchiveEntry:class contains two methods that extend
The following example shows how to create a new entry in a zip archive from an existing file, and extract the contents of the archive to a directory.
Available since 10
Available since 4.5
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.