Thanks to @NickD and @matteol for pointing me in the direction of jka-compr-compression-info-list
.
In Emacs 28, this list indeed contains an entry for Zstandard archives, but only for file endings *.zst
- hence my files named example.log.zstd
were not picked up by Emacs.
Since zst
is the official file extension for Zstandard files (https://datatracker.ietf.org/doc/html/rfc8878), I'll fix the program that generated these "incorrectly" named files.
If anyone else still wants to add new file endings to the list, here's how to do it:
(add-to-list 'jka-compr-compression-info-list
["\\.zstd\\'"
"zstd compressing" "zstd" ("-c", "-q")
"zstd decompressing" "zstd" ("-c", "-q", "-d")
nil t])
Based on the upstream implementation: https://github.com/emacs-mirror/emacs/blob/4b3de748b0b04407d2492500c77905de56de1180/lisp/jka-cmpr-hook.el#L257-L260
jka-compr-load-suffixes
and add an entry to handle such files tojka-compr-compression-info-list
. DoC-h v <variable>
on each of these two variables and see what you need to do.jka-compr-compression-info-list
. Make sure you have the correct compression and decompression programs available inexec-path
.