diff options
| author | Alexander Gramiak | 2019-06-24 15:57:33 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-06-24 16:08:12 +0200 |
| commit | 516761576c89e1c8ead0bd34bb104f990bb7a218 (patch) | |
| tree | 96556a62bbfd233e22fcaf9ffdc5ee7765ecabbd | |
| parent | c32cc62779ea31200df21c7c02c83bcb33ce7d21 (diff) | |
| download | emacs-516761576c89e1c8ead0bd34bb104f990bb7a218.tar.gz emacs-516761576c89e1c8ead0bd34bb104f990bb7a218.zip | |
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.
| -rw-r--r-- | doc/misc/tramp.texi | 9 | ||||
| -rw-r--r-- | etc/NEWS | 4 | ||||
| -rw-r--r-- | lisp/net/tramp-archive.el | 8 | ||||
| -rw-r--r-- | 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 e5ade9e97df..dc01f119e7a 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -3441,18 +3441,21 @@ Shell archives | |||
| 3441 | @cindex @file{shar} file archive suffix | 3441 | @cindex @file{shar} file archive suffix |
| 3442 | @cindex file archive suffix @file{shar} | 3442 | @cindex file archive suffix @file{shar} |
| 3443 | 3443 | ||
| 3444 | @item @samp{.tar}, @samp{.tbz}, @samp{.tgz}, @samp{.tlz}, @samp{.txz} --- | 3444 | @item @samp{.tar}, @samp{.tbz}, @samp{.tgz}, @samp{.tlz}, @samp{.txz}, |
| 3445 | @samp{.tzst} --- | ||
| 3445 | (Compressed) tape archives | 3446 | (Compressed) tape archives |
| 3446 | @cindex @file{tar} file archive suffix | 3447 | @cindex @file{tar} file archive suffix |
| 3447 | @cindex @file{tbz} file archive suffix | 3448 | @cindex @file{tbz} file archive suffix |
| 3448 | @cindex @file{tgz} file archive suffix | 3449 | @cindex @file{tgz} file archive suffix |
| 3449 | @cindex @file{tlz} file archive suffix | 3450 | @cindex @file{tlz} file archive suffix |
| 3450 | @cindex @file{txz} file archive suffix | 3451 | @cindex @file{txz} file archive suffix |
| 3452 | @cindex @file{tzst} file archive suffix | ||
| 3451 | @cindex file archive suffix @file{tar} | 3453 | @cindex file archive suffix @file{tar} |
| 3452 | @cindex file archive suffix @file{tbz} | 3454 | @cindex file archive suffix @file{tbz} |
| 3453 | @cindex file archive suffix @file{tgz} | 3455 | @cindex file archive suffix @file{tgz} |
| 3454 | @cindex file archive suffix @file{tlz} | 3456 | @cindex file archive suffix @file{tlz} |
| 3455 | @cindex file archive suffix @file{txz} | 3457 | @cindex file archive suffix @file{txz} |
| 3458 | @cindex file archive suffix @file{tzst} | ||
| 3456 | 3459 | ||
| 3457 | @item @samp{.warc} --- | 3460 | @item @samp{.warc} --- |
| 3458 | Web archives | 3461 | Web archives |
| @@ -3487,8 +3490,8 @@ File archives could also be compressed, identified by an additional | |||
| 3487 | compression suffix. Valid compression suffixes are listed in the | 3490 | compression suffix. Valid compression suffixes are listed in the |
| 3488 | constant @code{tramp-archive-compression-suffixes}. They are | 3491 | constant @code{tramp-archive-compression-suffixes}. They are |
| 3489 | @samp{.bz2}, @samp{.gz}, @samp{.lrz}, @samp{.lz}, @samp{.lz4}, | 3492 | @samp{.bz2}, @samp{.gz}, @samp{.lrz}, @samp{.lz}, @samp{.lz4}, |
| 3490 | @samp{.lzma}, @samp{.lzo}, @samp{.uu}, @samp{.xz} and @samp{.Z}. A | 3493 | @samp{.lzma}, @samp{.lzo}, @samp{.uu}, @samp{.xz}, @samp{.Z}, and |
| 3491 | valid archive file name would be | 3494 | @samp{.zst}. A valid archive file name would be |
| 3492 | @file{/path/to/dir/file.tar.gz/dir/file}. Even several suffixes in a | 3495 | @file{/path/to/dir/file.tar.gz/dir/file}. Even several suffixes in a |
| 3493 | row are possible, like @file{/path/to/dir/file.tar.gz.uu/dir/file}. | 3496 | row are possible, like @file{/path/to/dir/file.tar.gz.uu/dir/file}. |
| 3494 | 3497 | ||
| @@ -1286,6 +1286,10 @@ names are adjusted to the host name from the previous hop. | |||
| 1286 | timeout, after which the underlying session is disabled. This is for | 1286 | timeout, after which the underlying session is disabled. This is for |
| 1287 | security reasons. | 1287 | security reasons. |
| 1288 | 1288 | ||
| 1289 | +++ | ||
| 1290 | *** Zstandard compression is now supported when using libarchive 3.3 | ||
| 1291 | or newer. | ||
| 1292 | |||
| 1289 | ** Rcirc | 1293 | ** Rcirc |
| 1290 | 1294 | ||
| 1291 | --- | 1295 | --- |
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index d7f99667f45..8f15e37b5d8 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el | |||
| @@ -77,8 +77,8 @@ | |||
| 77 | ;; File archives could also be compressed, identified by an additional | 77 | ;; File archives could also be compressed, identified by an additional |
| 78 | ;; compression suffix. Valid compression suffixes are listed in the | 78 | ;; compression suffix. Valid compression suffixes are listed in the |
| 79 | ;; constant `tramp-archive-compression-suffixes'. They are ".bz2", | 79 | ;; constant `tramp-archive-compression-suffixes'. They are ".bz2", |
| 80 | ;; ".gz", ".lrz", ".lz", ".lz4", ".lzma", ".lzo", ".uu", ".xz" and | 80 | ;; ".gz", ".lrz", ".lz", ".lz4", ".lzma", ".lzo", ".uu", ".xz",".Z", |
| 81 | ;; ".Z". A valid archive file name would be | 81 | ;; and .zst. A valid archive file name would be |
| 82 | ;; "/path/to/dir/file.tar.gz/dir/file". Even several suffixes in a | 82 | ;; "/path/to/dir/file.tar.gz/dir/file". Even several suffixes in a |
| 83 | ;; row are possible, like "/path/to/dir/file.tar.gz.uu/dir/file". | 83 | ;; row are possible, like "/path/to/dir/file.tar.gz.uu/dir/file". |
| 84 | 84 | ||
| @@ -154,7 +154,7 @@ | |||
| 154 | "rar" ;; RAR archives. | 154 | "rar" ;; RAR archives. |
| 155 | "rpm" ;; Red Hat packages. | 155 | "rpm" ;; Red Hat packages. |
| 156 | "shar" ;; Shell archives. Not in libarchive testsuite. | 156 | "shar" ;; Shell archives. Not in libarchive testsuite. |
| 157 | "tar" "tbz" "tgz" "tlz" "txz" ;; (Compressed) tape archives. | 157 | "tar" "tbz" "tgz" "tlz" "txz" ".tzst" ;; (Compressed) tape archives. |
| 158 | "warc" ;; Web archives. | 158 | "warc" ;; Web archives. |
| 159 | "xar" ;; macOS XAR archives. Not in libarchive testsuite. | 159 | "xar" ;; macOS XAR archives. Not in libarchive testsuite. |
| 160 | "xpi" ;; XPInstall Mozilla addons. Not in libarchive testsuite. | 160 | "xpi" ;; XPInstall Mozilla addons. Not in libarchive testsuite. |
| @@ -169,7 +169,7 @@ It must be supported by libarchive(3).") | |||
| 169 | 169 | ||
| 170 | ;;;###autoload | 170 | ;;;###autoload |
| 171 | (defconst tramp-archive-compression-suffixes | 171 | (defconst tramp-archive-compression-suffixes |
| 172 | '("bz2" "gz" "lrz" "lz" "lz4" "lzma" "lzo" "uu" "xz" "Z") | 172 | '("bz2" "gz" "lrz" "lz" "lz4" "lzma" "lzo" "uu" "xz" "Z" "zst") |
| 173 | "List of suffixes which indicate a compressed file. | 173 | "List of suffixes which indicate a compressed file. |
| 174 | It must be supported by libarchive(3).") | 174 | It must be supported by libarchive(3).") |
| 175 | 175 | ||
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index d7db69a5ddb..a42ae9363ca 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -4533,6 +4533,7 @@ means discard it)." | |||
| 4533 | ("env GZIP= gzip" "env GZIP= gzip -d") | 4533 | ("env GZIP= gzip" "env GZIP= gzip -d") |
| 4534 | ("bzip2" "bzip2 -d") | 4534 | ("bzip2" "bzip2 -d") |
| 4535 | ("xz" "xz -d") | 4535 | ("xz" "xz -d") |
| 4536 | ("zstd --rm" "zstd -d --rm") | ||
| 4536 | ("compress" "compress -d")) | 4537 | ("compress" "compress -d")) |
| 4537 | "List of compress and decompress commands for inline transfer. | 4538 | "List of compress and decompress commands for inline transfer. |
| 4538 | Each item is a list that looks like this: | 4539 | Each item is a list that looks like this: |