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.

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
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.
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