Skip to content

Consider using Zstandard compression for build cache artifacts #12809

Description

@lptr

Facebook has a compression algorithm called Zstandard: https://facebook.github.io/zstd/

It seems to be much faster across the board than zlib, and it offers significant customizability wrt speed vs compression ratio.

The official implementation is native, but there are both JNI bindings for it and a pure Java implementation available.

We could use the JNI-based variant for platforms that are supported (Windows, macOS and various architectures on Linux), and fall back to the Java-only variant for unsupported ones.

image

The above graph seems to suggest that different environments could benefit from different compression ratios, i.e. local builds could use something that compresses faster, while CI builds could use something that takes longer to compress to a smaller size, so downloads become faster. See also #12810.


cc: @gradle/build-cache

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions