Variable: jka-compr-compression-info-list

jka-compr-compression-info-list is a customizable variable defined in jka-cmpr-hook.el.gz.

Value

Large value
(["\\.Z\\'" "compressing" "compress"
  ("-c")
  "uncompressing" "gzip"
  ("-c" "-q" "-d")
  nil t "\235" zlib-decompress-region]
 ["\\.bz2\\'" "bzip2ing" "bzip2" nil "bunzip2ing" "bzip2"
  ("-d")
  nil t "BZh"]
 ["\\.tbz2?\\'" "bzip2ing" "bzip2" nil "bunzip2ing" "bzip2"
  ("-d")
  nil nil "BZh"]
 ["\\.\\(?:tgz\\|svgz\\|sifz\\)\\'" "compressing" "gzip"
  ("-c" "-q")
  "uncompressing" "gzip"
  ("-c" "-q" "-d")
  t nil "\213" zlib-decompress-region]
 ["\\.g?z\\'" "compressing" "gzip"
  ("-c" "-q")
  "uncompressing" "gzip"
  ("-c" "-q" "-d")
  t t "\213" zlib-decompress-region]
 ["\\.lz\\'" "Lzip compressing" "lzip"
  ("-c" "-q")
  "Lzip uncompressing" "lzip"
  ("-c" "-q" "-d")
  t t "LZIP"]
 ["\\.lzma\\'" "LZMA compressing" "lzma"
  ("-c" "-q" "-z")
  "LZMA uncompressing" "lzma"
  ("-c" "-q" "-d")
  t t ""]
 ["\\.xz\\'" "XZ compressing" "xz"
  ("-c" "-q")
  "XZ uncompressing" "xz"
  ("-c" "-q" "-d")
  t t "\3757zXZ�"]
 ["\\.txz\\'" "XZ compressing" "xz"
  ("-c" "-q")
  "XZ uncompressing" "xz"
  ("-c" "-q" "-d")
  t nil "\3757zXZ�"]
 ["\\.dz\\'" nil nil nil "uncompressing" "gzip"
  ("-c" "-q" "-d")
  nil t "\213"]
 ["\\.zst\\'" "zstd compressing" "zstd"
  ("-c" "-q")
  "zstd uncompressing" "zstd"
  ("-c" "-q" "-d")
  t t "(\265/\375"]
 ["\\.tzst\\'" "zstd compressing" "zstd"
  ("-c" "-q")
  "zstd uncompressing" "zstd"
  ("-c" "-q" "-d")
  t nil "(\265/\375"])

Documentation

List of vectors that describe available compression techniques.

Each element, which describes a compression technique, is a vector of the form [REGEXP COMPRESS-MSG COMPRESS-PROGRAM COMPRESS-ARGS UNCOMPRESS-MSG UNCOMPRESS-PROGRAM UNCOMPRESS-ARGS APPEND-FLAG STRIP-EXTENSION-FLAG FILE-MAGIC-CHARS UNCOMPRESS-FUNCTION], where:

   regexp is a regexp that matches filenames that are
                         compressed with this format

   compress-msg is the message to issue to the user when doing this
                         type of compression (nil means no message)

   compress-program is a program that performs this compression
                         (nil means visit file in read-only mode)

   compress-args is a list of args to pass to the compress program

   uncompress-msg is the message to issue to the user when doing this
                         type of uncompression (nil means no message)

   uncompress-program is a program that performs this uncompression

   uncompress-args is a list of args to pass to the uncompress program

   append-flag is non-nil if this compression technique can be
                         appended

   strip-extension-flag non-nil means strip the regexp from file names
                         before attempting to set the mode.

   file-magic-chars is a string of characters that you would find
at the beginning of a file compressed in this way.

   uncompress-function is a function that performs uncompression, if
                         uncompress-program is not found.

If you set this outside Custom while Auto Compression mode is already enabled (as it is by default), you have to call jka-compr-update after setting it to properly update other variables. Setting this through Custom does that automatically.

This variable was added, or its default value changed, in Emacs 28.1.

Source Code

;; Defined in /usr/src/emacs/lisp/jka-cmpr-hook.el.gz
;; I have this defined so that .Z files are assumed to be in unix
;; compress format; and .gz files, in gzip format, and .bz2 files in bzip fmt.
(defcustom jka-compr-compression-info-list
  ;;[regexp
  ;; compr-message  compr-prog  compr-args
  ;; uncomp-message uncomp-prog uncomp-args
  ;; can-append strip-extension-flag file-magic-bytes
  ;; uncompress-function]
  (mapcar 'purecopy
  `(["\\.Z\\'"
     "compressing"    "compress"     ("-c")
     ;; gzip is more common than uncompress. It can only read, not write.
     "uncompressing"  "gzip"   ("-c" "-q" "-d")
     nil t "\037\235"
     zlib-decompress-region]
     ;; Formerly, these had an additional arg "-c", but that fails with
     ;; "Version 0.1pl2, 29-Aug-97." (RedHat 5.1 GNU/Linux) and
     ;; "Version 0.9.0b, 9-Sept-98".
    ["\\.bz2\\'"
     "bzip2ing"        "bzip2"         nil
     "bunzip2ing"      "bzip2"         ("-d")
     nil t "BZh"]
    ["\\.tbz2?\\'"
     "bzip2ing"        "bzip2"         nil
     "bunzip2ing"      "bzip2"         ("-d")
     nil nil "BZh"]
    ["\\.\\(?:tgz\\|svgz\\|sifz\\)\\'"
     "compressing"        "gzip"         ("-c" "-q")
     "uncompressing"      "gzip"         ("-c" "-q" "-d")
     t nil "\037\213"
     zlib-decompress-region]
    ["\\.g?z\\'"
     "compressing"        "gzip"         ("-c" "-q")
     "uncompressing"      "gzip"         ("-c" "-q" "-d")
     t t "\037\213"
     zlib-decompress-region]
    ["\\.lz\\'"
     "Lzip compressing"   "lzip"         ("-c" "-q")
     "Lzip uncompressing" "lzip"         ("-c" "-q" "-d")
     t t "LZIP"]
    ["\\.lzma\\'"
     "LZMA compressing"   "lzma"         ("-c" "-q" "-z")
     "LZMA uncompressing" "lzma"         ("-c" "-q" "-d")
     t t ""]
    ["\\.xz\\'"
     ;; On MacOS, gzip can uncompress xz files.
     "XZ compressing" ,(if (featurep 'ns) "gzip" "xz") ("-c" "-q")
     "XZ uncompressing"   "xz"           ("-c" "-q" "-d")
     t t "\3757zXZ\0"]
    ["\\.txz\\'"
     "XZ compressing"     "xz"           ("-c" "-q")
     "XZ uncompressing"   "xz"           ("-c" "-q" "-d")
     t nil "\3757zXZ\0"]
    ;; dzip is gzip with random access.  Its compression program can't
    ;; read/write stdin/out, so .dz files can only be viewed without
    ;; saving, having their contents decompressed with gzip.
    ["\\.dz\\'"
     nil              nil            nil
     "uncompressing"      "gzip"         ("-c" "-q" "-d")
     nil t "\037\213"]
    ["\\.zst\\'"
     "zstd compressing"   "zstd"         ("-c" "-q")
     "zstd uncompressing" "zstd"         ("-c" "-q" "-d")
     t t "\050\265\057\375"]
    ["\\.tzst\\'"
     "zstd compressing"   "zstd"         ("-c" "-q")
     "zstd uncompressing" "zstd"         ("-c" "-q" "-d")
     t nil "\050\265\057\375"]))

  "List of vectors that describe available compression techniques.
Each element, which describes a compression technique, is a vector of
the form [REGEXP COMPRESS-MSG COMPRESS-PROGRAM COMPRESS-ARGS
UNCOMPRESS-MSG UNCOMPRESS-PROGRAM UNCOMPRESS-ARGS
APPEND-FLAG STRIP-EXTENSION-FLAG FILE-MAGIC-CHARS UNCOMPRESS-FUNCTION], where:

   regexp                is a regexp that matches filenames that are
                         compressed with this format

   compress-msg          is the message to issue to the user when doing this
                         type of compression (nil means no message)

   compress-program      is a program that performs this compression
                         (nil means visit file in read-only mode)

   compress-args         is a list of args to pass to the compress program

   uncompress-msg        is the message to issue to the user when doing this
                         type of uncompression (nil means no message)

   uncompress-program    is a program that performs this uncompression

   uncompress-args       is a list of args to pass to the uncompress program

   append-flag           is non-nil if this compression technique can be
                         appended

   strip-extension-flag  non-nil means strip the regexp from file names
                         before attempting to set the mode.

   file-magic-chars      is a string of characters that you would find
			 at the beginning of a file compressed in this way.

   uncompress-function   is a function that performs uncompression, if
                         uncompress-program is not found.

If you set this outside Custom while Auto Compression mode is
already enabled \(as it is by default), you have to call
`jka-compr-update' after setting it to properly update other
variables.  Setting this through Custom does that automatically."
  :type '(repeat (vector regexp
			 (choice :tag "Compress Message"
				 (string :format "%v")
				 (const :tag "No Message" nil))
			 (choice :tag "Compress Program"
				 (string)
				 (const :tag "None" nil))
			 (repeat :tag "Compress Arguments" string)
			 (choice :tag "Uncompress Message"
				 (string :format "%v")
				 (const :tag "No Message" nil))
			 (choice :tag "Uncompress Program"
				 (string)
				 (const :tag "None" nil))
			 (repeat :tag "Uncompress Arguments" string)
			 (boolean :tag "Append")
			 (boolean :tag "Strip Extension")
			 (string :tag "Magic Bytes")
			 (choice :tag "Uncompress Function"
				 (symbol)
				 (const :tag "None" nil))))
  :set 'jka-compr-set
  :version "28.1"			; add uncompress-function
  :group 'jka-compr)