Allow setting compression algorithm per component
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
### Check existing issues
- [x] I've verified that this request isn't described by any existing issues.
### Request
Currently a snap and all its components use the compression algorithm that is set at the top level within snapcraft.yaml file. It is useful to allow a different compression algorithm between the snap and each of the components.
### The problem it solves
A snap and its components may include different kinds of artifacts. In certain scenarios, using `lzo` instead of the default `xz` is beneficial for the performance of the application. However, having setting `lzo` globally means the package loses the compression rate and tends to be larger overall.
For example, a package including a runtime and a large language model (LLM) could choose `xz` for the runtime (high compression gain on software artifacts) and `lzo` for the model (high performance when loading the model).
Ideally, the LLM should be packaged with no compression at all if it is pre-compressed, but this is not supported right now.
Evaluation history
No evaluation history available.