Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for ZStandard compression. #208

Merged
merged 1 commit into from Jun 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion syncoid
Expand Up @@ -368,6 +368,18 @@ sub compressargset {
decomrawcmd => '/usr/bin/pigz',
decomargs => '-dc',
},
'zstd-fast' => {
rawcmd => '/usr/bin/zstd',
args => '-3',
decomrawcmd => '/usr/bin/zstd',
decomargs => '-dc',
},
'zstd-slow' => {
rawcmd => '/usr/bin/zstd',
args => '-19',
decomrawcmd => '/usr/bin/zstd',
decomargs => '-dc',
},
'lzo' => {
rawcmd => '/usr/bin/lzop',
args => '',
Expand All @@ -378,7 +390,7 @@ sub compressargset {

if ($value eq 'default') {
$value = $DEFAULT_COMPRESSION;
} elsif (!(grep $value eq $_, ('gzip', 'pigz-fast', 'pigz-slow', 'lzo', 'default', 'none'))) {
} elsif (!(grep $value eq $_, ('gzip', 'pigz-fast', 'pigz-slow', 'zstd-fast', 'zstd-slow', 'lzo', 'default', 'none'))) {
warn "Unrecognised compression value $value, defaulting to $DEFAULT_COMPRESSION";
$value = $DEFAULT_COMPRESSION;
}
Expand Down