ZIP libraries for C#
For .NET there are 3 main choices:
- System.IO.Compression (
ZipFile,ZipArchive) is built into .NET. It creates, reads and updates archives, extracts directories safely and has async methods since .NET 10. It doesn’t support passwords. Use it unless you need encryption. - SharpZipLib reads and writes ZipCrypto and AES-encrypted archives, has stream classes (
ZipInputStream,ZipOutputStream) and a one-callFastZiphelper. MIT license. Development is slow. - SharpCompress reads ZIP, RAR, 7z, tar, gzip and more with one API, including forward-only reading from non-seekable streams, and writes ZIP with Deflate, Zstandard and other methods. MIT license.
- SharpCompress SharpCompress is a pure C# library for ZIP, RAR, 7z, tar and gzip. How to extract and create ZIP files, read encrypted archives.
- SharpZipLib SharpZipLib is an open-source C# library for ZIP, gzip, tar and bzip2. How to create and extract password-protected (AES) ZIP files, stream entries.
- System.IO.Compression System.IO.Compression is the built-in .NET API for ZIP archives. How to create and extract ZIP files, list entries, add files to an existing archive.