ssh <user>@<host> "tar cf - <dir>" | zstd > <archive>
When extracting a compressed tar archive, tar
will automatically pick the
decompression program. Should one want to override the default behavior and
manually specify the program, use:
tar --use-compress-program=<program> -xf <input>
For example, zstd
-compressed tar archive can be decompressed by
--use-compress-program=unzstd
.