emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 5167615 3/6: Add Zstandard compression support for


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 5167615 3/6: Add Zstandard compression support for Tramp
Date: Mon, 24 Jun 2019 10:08:22 -0400 (EDT)

branch: master
commit 516761576c89e1c8ead0bd34bb104f990bb7a218
Author: Alexander Gramiak <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Add Zstandard compression support for Tramp
    
    * lisp/net/tramp-archive.el (tramp-archive-suffixes)
    (tramp-archive-compression-suffixes): Add zstd compression suffixes.
    * lisp/net/tramp-sh.el (tramp-inline-compress-commands): Add
    zstd (de)compression commands.
---
 doc/misc/tramp.texi       | 9 ++++++---
 etc/NEWS                  | 4 ++++
 lisp/net/tramp-archive.el | 8 ++++----
 lisp/net/tramp-sh.el      | 1 +
 4 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index e5ade9e..dc01f11 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -3441,18 +3441,21 @@ Shell archives
 @cindex @file{shar} file archive suffix
 @cindex file archive suffix @file{shar}
 
-@item @samp{.tar}, @samp{.tbz}, @samp{.tgz}, @samp{.tlz}, @samp{.txz} ---
+@item @samp{.tar}, @samp{.tbz}, @samp{.tgz}, @samp{.tlz}, @samp{.txz},
+@samp{.tzst} ---
 (Compressed) tape archives
 @cindex @file{tar} file archive suffix
 @cindex @file{tbz} file archive suffix
 @cindex @file{tgz} file archive suffix
 @cindex @file{tlz} file archive suffix
 @cindex @file{txz} file archive suffix
+@cindex @file{tzst} file archive suffix
 @cindex file archive suffix @file{tar}
 @cindex file archive suffix @file{tbz}
 @cindex file archive suffix @file{tgz}
 @cindex file archive suffix @file{tlz}
 @cindex file archive suffix @file{txz}
+@cindex file archive suffix @file{tzst}
 
 @item @samp{.warc} ---
 Web archives
@@ -3487,8 +3490,8 @@ File archives could also be compressed, identified by an 
additional
 compression suffix.  Valid compression suffixes are listed in the
 constant @code{tramp-archive-compression-suffixes}.  They are
 @samp{.bz2}, @samp{.gz}, @samp{.lrz}, @samp{.lz}, @samp{.lz4},
-@samp{.lzma}, @samp{.lzo}, @samp{.uu}, @samp{.xz} and @samp{.Z}.  A
-valid archive file name would be
+@samp{.lzma}, @samp{.lzo}, @samp{.uu}, @samp{.xz}, @samp{.Z}, and
+@samp{.zst}.  A valid archive file name would be
 @file{/path/to/dir/file.tar.gz/dir/file}.  Even several suffixes in a
 row are possible, like @file{/path/to/dir/file.tar.gz.uu/dir/file}.
 
diff --git a/etc/NEWS b/etc/NEWS
index 5e134c4..de96198 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1286,6 +1286,10 @@ names are adjusted to the host name from the previous 
hop.
 timeout, after which the underlying session is disabled.  This is for
 security reasons.
 
++++
+*** Zstandard compression is now supported when using libarchive 3.3
+or newer.
+
 ** Rcirc
 
 ---
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el
index d7f9966..8f15e37 100644
--- a/lisp/net/tramp-archive.el
+++ b/lisp/net/tramp-archive.el
@@ -77,8 +77,8 @@
 ;; File archives could also be compressed, identified by an additional
 ;; compression suffix.  Valid compression suffixes are listed in the
 ;; constant `tramp-archive-compression-suffixes'.  They are ".bz2",
-;; ".gz", ".lrz", ".lz", ".lz4", ".lzma", ".lzo", ".uu", ".xz" and
-;; ".Z".  A valid archive file name would be
+;; ".gz", ".lrz", ".lz", ".lz4", ".lzma", ".lzo", ".uu", ".xz",".Z",
+;; and .zst.  A valid archive file name would be
 ;; "/path/to/dir/file.tar.gz/dir/file".  Even several suffixes in a
 ;; row are possible, like "/path/to/dir/file.tar.gz.uu/dir/file".
 
@@ -154,7 +154,7 @@
     "rar" ;; RAR archives.
     "rpm" ;; Red Hat packages.
     "shar" ;; Shell archives.  Not in libarchive testsuite.
-    "tar" "tbz" "tgz" "tlz" "txz" ;; (Compressed) tape archives.
+    "tar" "tbz" "tgz" "tlz" "txz" ".tzst" ;; (Compressed) tape archives.
     "warc" ;; Web archives.
     "xar" ;; macOS XAR archives.  Not in libarchive testsuite.
     "xpi" ;; XPInstall Mozilla addons.  Not in libarchive testsuite.
@@ -169,7 +169,7 @@ It must be supported by libarchive(3).")
 
 ;;;###autoload
 (defconst tramp-archive-compression-suffixes
-  '("bz2" "gz" "lrz" "lz" "lz4" "lzma" "lzo" "uu" "xz" "Z")
+  '("bz2" "gz" "lrz" "lz" "lz4" "lzma" "lzo" "uu" "xz" "Z" "zst")
   "List of suffixes which indicate a compressed file.
 It must be supported by libarchive(3).")
 
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index d7db69a..a42ae93 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4533,6 +4533,7 @@ means discard it)."
     ("env GZIP= gzip" "env GZIP= gzip -d")
     ("bzip2" "bzip2 -d")
     ("xz" "xz -d")
+    ("zstd --rm" "zstd -d --rm")
     ("compress" "compress -d"))
   "List of compress and decompress commands for inline transfer.
 Each item is a list that looks like this:



reply via email to

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