From 2c009be6cec3c5960e3eb7bee0c00c783c4395f2 Mon Sep 17 00:00:00 2001 From: Orsiris de Jong Date: Tue, 29 Apr 2025 16:52:20 +0200 Subject: [PATCH] add zstd-medium compression parameter --- syncoid | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/syncoid b/syncoid index 6ef1cf0..15dce0d 100755 --- a/syncoid +++ b/syncoid @@ -1150,6 +1150,12 @@ sub compressargset { decomrawcmd => 'zstd', decomargs => "-T$ncpus -dc", }, + 'zstd-medium' => { + rawcmd => 'zstd', + args => "-T$ncpus -8", + decomrawcmd => 'zstd', + decomargs => "-T$ncpus -dc", + }, 'zstdmt-fast' => { rawcmd => 'zstdmt', args => '-3', @@ -1190,7 +1196,7 @@ sub compressargset { if ($value eq 'default') { $value = $DEFAULT_COMPRESSION; - } elsif (!(grep $value eq $_, ('gzip', 'pigz-fast', 'pigz-slow', 'zstd-fast', 'zstdmt-fast', 'zstd-slow', 'zstdmt-slow', 'lz4', 'xz', 'lzo', 'default', 'none'))) { + } elsif (!(grep $value eq $_, ('gzip', 'pigz-fast', 'pigz-slow', 'zstd-fast', 'zstd-medium', 'zstdmt-fast', 'zstd-slow', 'zstdmt-slow', 'lz4', 'xz', 'lzo', 'default', 'none'))) { writelog('WARN', "Unrecognised compression value $value, defaulting to $DEFAULT_COMPRESSION"); $value = $DEFAULT_COMPRESSION; } @@ -2323,7 +2329,7 @@ syncoid - ZFS snapshot replication tool Options: - --compress=FORMAT Compresses data during transfer. Currently accepted options are gzip, pigz-fast, pigz-slow, zstd-fast, zstdmt-fast, zstd-slow, zstdmt-slow, lz4, xz, lzo (default) & none + --compress=FORMAT Compresses data during transfer. Currently accepted options are gzip, pigz-fast, pigz-slow, zstd-fast, zstd-medium, zstdmt-fast, zstd-slow, zstdmt-slow, lz4, xz, lzo (default) & none --identifier=EXTRA Extra identifier which is included in the snapshot name. Can be used for replicating to multiple targets. --recursive|r Also transfers child datasets --skip-parent Skips syncing of the parent dataset. Does nothing without '--recursive' option.