Add a support for decompressing Zstandard-compressed YAML files #610
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.
Magic numbers and file name extension of Zstandard archives are taken from RFC 8878. File extensions were consuleted with crearerepo_c rpm-software-management/createrepo_c#345. Decompression is implemented with rpmio, which added the support in rpm-4.14.0. Zstandard support in rpmio is checked at run-time.
NOTE: Only standardized "zst" file name extension is suppored. I believe that createrepo_c won't implement nonstandard "zstd" extension
rpm-software-management/createrepo_c#345.
NOTE: Version bumped to 2.15 because this adds a new feature and enhances API.
TODO: Check interoperability with crearerepo_c when it receives the support.
TODO: Deprecate MODULEMD_COMPRESSION_TYPE_SENTINEL and remove it on next ABI break. This end of enum prevents from adding new enum values in natural order. E.g. if an application uses
MODULEMD_COMPRESSION_TYPE_SENTINEL for whatever reason, inserting a value before it would change MODULEMD_COMPRESSION_TYPE_SENTINEL value which is an ABI break. Funilly that value is not used anywhere in libmodulemd code. Only in tests to iterate over the enum.
#606