Skip to content

Commit d4f7046

Browse files
authored
compress-checksum: introduce COMPRESS_OUTPUTIMAGE=zst (#9101)
1 parent de044ed commit d4f7046

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/functions/image/compress-checksum.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ function output_images_compress_and_checksum() {
4141
display_alert "Compressing with xz" "${uncompressed_file_basename}.xz" "info"
4242
xz -T 0 "-${xz_compression_ratio_image}" "${uncompressed_file}" # "If xz is provided with input but no output, it will delete the input"
4343
compression_type=".xz"
44+
elif [[ $COMPRESS_OUTPUTIMAGE == *zst* ]]; then
45+
display_alert "Compressing with zstd" "${uncompressed_file_basename}.zst" "info"
46+
zstdmt "-${ZSTD_COMPRESSION_LEVEL:-9}" "${uncompressed_file}" -o "${uncompressed_file}.zst"
47+
rm -f "${uncompressed_file}"
48+
compression_type=".zst"
4449
fi
4550

4651
if [[ $COMPRESS_OUTPUTIMAGE == *sha* ]]; then

0 commit comments

Comments
 (0)