SharpZipLib VS ZipWrapper

Compare SharpZipLib vs ZipWrapper and see what are their differences.

SharpZipLib

#ziplib is a Zip, GZip, Tar and BZip2 library written entirely in C# for the .NET platform. (by icsharpcode)

ZipWrapper

A simple zip wrapper based on Lzma and Zlib compress algorithm (by srxqds)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
SharpZipLib ZipWrapper
5 -
3,608 4
0.9% -
2.3 0.0
27 days ago almost 8 years ago
C# C#
MIT License -
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

SharpZipLib

Posts with mentions or reviews of SharpZipLib. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-08-01.
  • Best practice to generate ZIP file for client side download?
    2 projects | /r/Blazor | 1 Aug 2022
    public class DownloadStreamedZippedFilesActionResult : FileResult { private const int Zip64CentralDirectoryRecordSize = 56; private const int Zip64CentralDirectoryLocatorSize = 20; /// /// This was obtained by debugging DotNetZip. It might change in newer versions of the library. The size is hardcoded with no constant available, not even a private one. /// private const int DotNetZipLocalFileHeaderExtraFieldLength = 20; private const int DotNetZipCentralDirectoryHeaderExtraFieldLength = 32; private const string ZipExtension = ".zip"; private static readonly ILogger Logger = ApplicationLogging.CreateLogger(); private readonly IReadOnlyCollection files; private readonly CancellationToken cancellationToken; public DownloadStreamedZippedFilesActionResult(string fileName, IEnumerable files, CancellationToken cancellationToken) : base(MediaTypeConverter.GetMimeType(ZipExtension)) { this.files = files.ToArray(); FileDownloadName = fileName + ZipExtension; this.cancellationToken = cancellationToken; } public DownloadStreamedZippedFilesActionResult(string fileName, IEnumerable files) : this(fileName, files, new CancellationToken(false)) { } public override Task ExecuteResultAsync(ActionContext context) { var response = context.HttpContext.Response; response.OnStarting(() => { var contentDisposition = new ContentDispositionHeaderValue("attachment"); contentDisposition.SetHttpFileName(FileDownloadName); response.Headers.Add("access-control-expose-headers", new[] { "content-disposition", "content-length" }); response.Headers.Add("content-disposition", contentDisposition.ToString()); response.Headers.ContentLength = CalculateContentLength(); return Task.FromResult(0); }); var callback = GetCallback(); return callback(response.Body); } private Func GetCallback() { return async (outputStream) => { byte[] buffer = new byte[4096]; try { var countingStream = new CountingStream(outputStream); using (outputStream) using (var zipStream = new Ionic.Zip.ZipOutputStream(countingStream, true)) { zipStream.CompressionLevel = Ionic.Zlib.CompressionLevel.Level0; zipStream.CompressionMethod = Ionic.Zip.CompressionMethod.None; zipStream.EnableZip64 = Zip64Option.Always; foreach (var file in files) { using (var fileContent = await file.GetContentAsync()) { zipStream.PutNextEntry(file.Name); StreamUtils.Copy(fileContent, zipStream, buffer); zipStream.Flush(); outputStream.Flush(); } cancellationToken.ThrowIfCancellationRequested(); } zipStream.Flush(); zipStream.Close(); outputStream.Flush(); } } catch (Exception e) { Logger.LogError(e, "Unexpected error streaming {FileName}", FileDownloadName); throw; } }; } private long CalculateContentLength() { /* ZIP file size constants according to the specification https://users.cs.jmu.edu/buchhofp/forensics/formats/pkzip.html and https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT * Please note this only works with compression type 0 (store, no compression). * This formula also takes into account the additional content DotNetZip adds in the extra fields. It might be different for other zip providers. * ZIP constants come from SharpZipLib https://github.com/icsharpcode/SharpZipLib/blob/master/src/ICSharpCode.SharpZipLib/Zip/ZipConstants.cs */ return files.Count * (ZipConstants.LocalHeaderBaseSize + ZipConstants.Zip64DataDescriptorSize + ZipConstants.CentralHeaderBaseSize + DotNetZipLocalFileHeaderExtraFieldLength + DotNetZipCentralDirectoryHeaderExtraFieldLength) + 2 * files.Sum(f => f.Name.Length) + files.Sum(f => f.Size) + ZipConstants.EndOfCentralRecordBaseSize + Zip64CentralDirectoryRecordSize + Zip64CentralDirectoryLocatorSize; } } public record class StreamedFile { private readonly Func> fileFunc; public StreamedFile(string name, long size, Func> fileFunc) { this.fileFunc = fileFunc; Name = name; Size = size; } public string Name { get; } public long Size { get; } /// /// Callback to get the file from S3, Azure Storage or wherever /// public Task GetContentAsync() => fileFunc(); }
  • Process StandardOutput misses lines when compared with direct CMD output (.NET 6)
    1 project | /r/dotnet | 20 May 2022
  • Package to open/extract a DEB archive in C#
    1 project | /r/csharp | 23 Apr 2022
  • Problem exporting to CBZ (maybe Windows 11 problem)
    1 project | /r/comicrackusers | 6 Dec 2021
  • Malware downloaded from PyPI 41,000 times was surprisingly stealthy
    2 projects | /r/programming | 20 Nov 2021
    Not python but I have story of team that depended on a C# library for saving zip files (SharpZipLib); turns out SharpZipLib had an issue: it could corrupt zip files ( https://github.com/icsharpcode/SharpZipLib/issues/391 ). This was a desktop app and reports from users came pouring in about they not being able to open their files. In response the company had to first manually recover their user's data; and nowadays they stress test sharpziplib to make sure it does not produce corrupted files in newer versions.

ZipWrapper

Posts with mentions or reviews of ZipWrapper. We have used some of these posts to build our list of alternatives and similar projects.

We haven't tracked posts mentioning ZipWrapper yet.
Tracking mentions began in Dec 2020.

What are some alternatives?

When comparing SharpZipLib and ZipWrapper you can also consider the following projects:

SharpCompress - SharpCompress is a fully managed C# library to deal with many compression types and formats.

DotNetZip.Semverd - A fork of the DotNetZip project without signing with a solution that compiles cleanly. This project aims to follow semver to avoid versioning conflicts. DotNetZip is a FAST, FREE class library and toolset for manipulating zip files. Use VB, C# or any .NET language to easily create, extract, or update zip files.

Owin.Compression - Compression (Deflate / GZip) module for Microsoft OWIN filesystem pipeline. Works with Selfhost and also on AspNetCore.

Snappy.Sharp - An implementation of google's Snappy compression format in C#

Snappy for Windows

RubyGems - The Ruby community's gem hosting service.

FileDBReader - A command line tool for working with a proprietary bluebyte file compression used in Anno 2205 and 1800.