guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: pack: Add zstd compressor.


From: guix-commits
Subject: 01/02: pack: Add zstd compressor.
Date: Tue, 16 Jun 2020 07:43:21 -0400 (EDT)

nckx pushed a commit to branch master
in repository guix.

commit 38ee8f7dbaabbb1ba28bc0fa6240a19bba2450c3
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Wed Jun 10 22:03:27 2020 +0200

    pack: Add zstd compressor.
    
    * guix/scripts/pack.scm (%compressors): Add zstd.
    * doc/guix.texi (Invoking guix pack): Document it.
---
 doc/guix.texi         | 3 ++-
 guix/scripts/pack.scm | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index ab44dd7..6b4fa5b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5345,7 +5345,8 @@ configuration triplets,, autoconf, Autoconf}).
 @item --compression=@var{tool}
 @itemx -C @var{tool}
 Compress the resulting tarball using @var{tool}---one of @code{gzip},
-@code{bzip2}, @code{xz}, @code{lzip}, or @code{none} for no compression.
+@code{zstd}, @code{bzip2}, @code{xz}, @code{lzip}, or @code{none} for no
+compression.
 
 @item --symlink=@var{spec}
 @itemx -S @var{spec}
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 518bf6e..55fb3e8 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
 ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -81,6 +82,11 @@
                     #~(#+(file-append xz "/bin/xz") "-e"))
         (compressor "bzip2" ".bz2"
                     #~(#+(file-append bzip2 "/bin/bzip2") "-9"))
+        (compressor "zstd" ".zst"
+                    ;; The default level 3 compresses better than gzip in a
+                    ;; fraction of the time, while the highest level 19
+                    ;; (de)compresses more slowly and worse than xz.
+                    #~(#+(file-append zstd "/bin/zstd") "-3"))
         (compressor "none" "" #f)))
 
 ;; This one is only for use in this module, so don't put it in %compressors.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]