add compression

This commit is contained in:
Artur Gurgul1 2025-08-10 07:30:01 +02:00
parent 75c3228c5e
commit 045d586fb6

View file

@ -111,12 +111,25 @@ done
# Create an archive # Create an archive
# #
echo "making the archive" # echo "making the archive"
zstd -T0 --ultra -22 winux.img -o winux.img.zst # zstd -T0 --ultra -22 winux.img -o winux.img.zst
# decompression with # # decompression with
# unzstd --sparse winux.img.zst # # unzstd --sparse winux.img.zst
# or # # or
# zstd -d --sparse winux.img.zst -o winux.img # # zstd -d --sparse winux.img.zst -o winux.img
############# Another option, seems to be the best option
tar --sparse -I 'zstd -T0 --ultra -22 --long=31' \
-cvf winux.img.tar.zst winux.img
# extract
# brew install gnu-tar
# tar -I zstd -xvf winux.img.tar.zst
# on macOS /opt/homebrew/opt/gnu-tar/libexec/gnubin/tar -I 'zstd --long=31' -xvf winux.img.tar.zst winux.img
# compressing with XZ. Supprisely it seems to have worst compresion rate than zstd
# tar --sparse -I 'xz -T0 -9e' -cvf winux.img.tar.xz winux.img
## Extracting
# tar -I xz -xvf winux.img.tar.xz