From aa7edc6ef1d0e06eef429a64993821e46361ba63 Mon Sep 17 00:00:00 2001
From: bjorn3 <17426603+bjorn3@users.noreply.github.com>
Date: Thu, 11 Jan 2024 20:16:43 +0100
Subject: [PATCH] Zstd compress all images

I tried gzip, bzip2, xz and xzstd. Xz 22s for a 128MB disk image. Out of
all other options zstd was both the fastest to compress (<1s) and
produced the smallest file (28MB).
---
 .gitlab-ci.yml | 3 ++-
 mk/ci.mk       | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e88712fa5..de5c465da 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,7 +21,8 @@ before_script:
         nasm \
         pkg-config \
         texinfo \
-        wget &&
+        wget \
+        zstd &&
     curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
 
 img:
diff --git a/mk/ci.mk b/mk/ci.mk
index 976343a5f..1dbb3ef4a 100644
--- a/mk/ci.mk
+++ b/mk/ci.mk
@@ -8,6 +8,7 @@ ci-img: FORCE
 	rm -rf $(IMG_DIR)
 	mkdir -p $(IMG_DIR)
 	$(MAKE) demo desktop server
+	cd $(IMG_DIR) && zstd --rm *
 	cd $(IMG_DIR) && sha256sum -b * > SHA256SUM
 
 # The name of the target must match the name of the filesystem config file
-- 
GitLab