Skip to content

Support Zstandard compression in ZipArchives #123532

@rzikm

Description

@rzikm

Now that we have #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 #95909

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions