diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2017-03-23 11:47:32 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2017-04-02 14:42:20 +0300 |
commit | 63102406f22412bb922de5549deb89d3594a38c0 (patch) | |
tree | 747dc2542233b22cb05082ea731ffa4c92eb9510 /guix/utils.scm | |
parent | 6800c79701abfc90eecc1d8fc4b217d5adf6263a (diff) |
guix: Compress and decompress xz archives in parallel.
* guix/scripts/pack.scm (%compressors): Add flag '-T0' when calling "xz".
* guix/utils.scm (decompressed-port, compressed-port,
compressed-output-port): Same.
Diffstat (limited to 'guix/utils.scm')
-rw-r--r-- | guix/utils.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/guix/utils.scm b/guix/utils.scm index bc90686de0..fb962df8ba 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net> ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org> ;;; Copyright © 2015 David Thompson <davet@gnu.org> +;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> ;;; ;;; This file is part of GNU Guix. ;;; @@ -154,7 +155,7 @@ a symbol such as 'xz." (match compression ((or #f 'none) (values input '())) ('bzip2 (filtered-port `(,%bzip2 "-dc") input)) - ('xz (filtered-port `(,%xz "-dc") input)) + ('xz (filtered-port `(,%xz "-dc -T0") input)) ('gzip (filtered-port `(,%gzip "-dc") input)) (else (error "unsupported compression scheme" compression)))) @@ -164,7 +165,7 @@ a symbol such as 'xz." (match compression ((or #f 'none) (values input '())) ('bzip2 (filtered-port `(,%bzip2 "-c") input)) - ('xz (filtered-port `(,%xz "-c") input)) + ('xz (filtered-port `(,%xz "-c -T0") input)) ('gzip (filtered-port `(,%gzip "-c") input)) (else (error "unsupported compression scheme" compression)))) @@ -221,7 +222,7 @@ program--e.g., '(\"--fast\")." (match compression ((or #f 'none) (values output '())) ('bzip2 (filtered-output-port `(,%bzip2 "-c" ,@options) output)) - ('xz (filtered-output-port `(,%xz "-c" ,@options) output)) + ('xz (filtered-output-port `(,%xz "-c -T0" ,@options) output)) ('gzip (filtered-output-port `(,%gzip "-c" ,@options) output)) (else (error "unsupported compression scheme" compression)))) |