iso-image: enable XZ compress filter
Minimal ISO:
1m21 -> 2m25
625M -> 617M
Plasma5 ISO:
2m45 -> 5m18
1.4G -> 1.3G
Decompression speed stays about the same. It's just a few seconds for the whole
image anyways and, with that kind of speed, you're going to be bottlenecked by
IO long before the CPU.
commit2fcab516c4cae0bc50455abd356f60e576fec5d9
authorAtemu <atemu.main@gmail.com>
dateSun 10 Jan 2021, 10:03 (6 years ago)
parentf211631
nixos/modules/installer/cd-dvd/iso-image.nix+6−1
@@ -425,7 +425,12 @@ in
425425 };
426426
427427 isoImage.squashfsCompression = mkOption {
428− default = "xz -Xdict-size 100%";
428+ default = with pkgs.stdenv.targetPlatform; "xz -Xdict-size 100% "
429+ + lib.optionalString (isx86_32 || isx86_64) "-Xbcj x86"
430+ # Untested but should also reduce size for these platforms
431+ + lib.optionalString (isAarch32 || isAarch64) "-Xbcj arm"
432+ + lib.optionalString (isPowerPC) "-Xbcj powerpc"
433+ + lib.optionalString (isSparc) "-Xbcj sparc";
429434 description = ''
430435 Compression settings to use for the squashfs nix store.
431436 '';