Subject: Re: bug#44901: 28.0.50; dired-compress-file: provide customization for compressing command

From: Jean Louis <[email-masked]>
Date: Fri, 27 Nov 2020 13:02:25 +0300

Additionally this variable should be updated:

(defvar dired-compress-files-alist
  '(("\\.tar\\.gz\\'" . "tar -cf - %i | gzip -c9 > %o")
    ("\\.tar\\.bz2\\'" . "tar -cf - %i | bzip2 -c9 > %o")
    ("\\.tar\\.xz\\'" . "tar -cf - %i | xz -c9 > %o")
    ("\\.tar\\.zst\\'" . "tar -cf - %i | zstd -19 -o %o")
    ("\\.zip\\'" . "zip %o -r --filesync %i"))

to be:

(defvar dired-compress-files-alist
  '(("\\.tar\\.gz\\'" . "tar -cf - %i | gzip -c9 > %o")
    ("\\.tar\\.bz2\\'" . "tar -cf - %i | bzip2 -c9 > %o")
    ("\\.tar\\.xz\\'" . "tar -cf - %i | xz -c9 > %o")
    ("\\.tar\\.lz\\'" . "tar -cf - %i | lzip -c9 > %o") ;; new line for lzip
    ("\\.tar\\.lzo\\'" . "tar -cf - %i | lzop -c9 > %o") ;; new line for lzop
    ("\\.tar\\.zst\\'" . "tar -cf - %i | zstd -19 -o %o")
    ("\\.zip\\'" . "zip %o -r --filesync %i"))

Updating that function with those compressors is useful and related
this wish to have "gzip" also customizable. As dired-x supports
decompressing various files but user have no possibility to customize
the compressor command.

There are also pbzip2, pigz, pixz, pixz that offer parallel
compression that could be included in future.