flatpak-build-bundle: Add --oci-layer-compress=zlib #5540
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an option to build OCI bundles with zstd compressed layers, speeding up compression by several times, and resulting in about a 20% smaller result (timings are in a comment in the patch).
gzip is kept as the default for maximum compatibility:
Notes
ZSTD_CStream
data type I'm using is somewhat obsolescent, though not deprecated - according to the docs,ZSTD_CStream
was unified withZSTD_CCtx
in 1.3.0, released in 2017. Might make sense to upgrade the Flatpak min zstd version from the current 0.8.1 - hard to say whether this would actually work with 0.8.1.Ecosystem support
distribution/distribution: no explicit support, but works
quay.io: sinc 2021
Amazon ECR: supported
pulp_container: since 2022
flatpak: since first-OCI supporting version
tardiff: since first version