From d4f7046c88aa7ebcffe82cfd5aa0e4b941842b41 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Fri, 19 Dec 2025 13:00:45 +0100 Subject: [PATCH] compress-checksum: introduce `COMPRESS_OUTPUTIMAGE=zst` (#9101) --- lib/functions/image/compress-checksum.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/functions/image/compress-checksum.sh b/lib/functions/image/compress-checksum.sh index 824092e2b2..793d98b2e5 100644 --- a/lib/functions/image/compress-checksum.sh +++ b/lib/functions/image/compress-checksum.sh @@ -41,6 +41,11 @@ function output_images_compress_and_checksum() { display_alert "Compressing with xz" "${uncompressed_file_basename}.xz" "info" xz -T 0 "-${xz_compression_ratio_image}" "${uncompressed_file}" # "If xz is provided with input but no output, it will delete the input" compression_type=".xz" + elif [[ $COMPRESS_OUTPUTIMAGE == *zst* ]]; then + display_alert "Compressing with zstd" "${uncompressed_file_basename}.zst" "info" + zstdmt "-${ZSTD_COMPRESSION_LEVEL:-9}" "${uncompressed_file}" -o "${uncompressed_file}.zst" + rm -f "${uncompressed_file}" + compression_type=".zst" fi if [[ $COMPRESS_OUTPUTIMAGE == *sha* ]]; then