dotnet / dotnet/runtime

Support Zstandard compression in ZipArchives

Open
#123,532 7 comments 0 reactions 0 assignees View on GitHub
area-System.IO.Compression
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

Now that we have https://github.com/dotnet/runtime/issues/59591 implemented, we can recognize zip archive entries that were compressed using zstd (with identifier value 93).

Addition of Zstandard to ZipCompressionMethod has been preapproved in https://github.com/dotnet/runtime/issues/95909

```diff
public enum ZipCompressionMethod : ushort
{
+ Zstandard = 0x5D,
}
```

Edit:

This will likely need additional API shape to opt-in for zstd when decompressing (so that we don't punish existing users with increased binary size for zstd support), as well as an additional API to specify what type of compression should be used when compressing the entry (and with what parameters?).

Given that zstd-compressed zips are rare in practice (not all tools support it, so they are way less interoperable and Deflate and Stored are the only trule portable options), we should probably hold on until we get a compelling use-case.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.