mirror of https://github.com/digint/btrbk
btrbk: add support for zstandard (zstd) compression
parent
3adf2f873b
commit
3562e75a70
1
btrbk
1
btrbk
|
@ -54,6 +54,7 @@ my %compression = (
|
||||||
xz => { name => 'xz', format => 'xz', compress_cmd => [ 'xz', '-c' ], decompress_cmd => [ 'xz', '-d', '-c' ], level_min => 0, level_max => 9, threads => '-T' },
|
xz => { name => 'xz', format => 'xz', compress_cmd => [ 'xz', '-c' ], decompress_cmd => [ 'xz', '-d', '-c' ], level_min => 0, level_max => 9, threads => '-T' },
|
||||||
lzo => { name => 'lzo', format => 'lzo', compress_cmd => [ 'lzop', '-c' ], decompress_cmd => [ 'lzop', '-d', '-c' ], level_min => 1, level_max => 9 },
|
lzo => { name => 'lzo', format => 'lzo', compress_cmd => [ 'lzop', '-c' ], decompress_cmd => [ 'lzop', '-d', '-c' ], level_min => 1, level_max => 9 },
|
||||||
lz4 => { name => 'lz4', format => 'lz4', compress_cmd => [ 'lz4', '-c' ], decompress_cmd => [ 'lz4', '-d', '-c' ], level_min => 1, level_max => 9 },
|
lz4 => { name => 'lz4', format => 'lz4', compress_cmd => [ 'lz4', '-c' ], decompress_cmd => [ 'lz4', '-d', '-c' ], level_min => 1, level_max => 9 },
|
||||||
|
zstd => { name => 'zstd', format => 'zst', compress_cmd => [ 'zstd', '-c' ], decompress_cmd => [ 'zstd', '-d', '-c' ], level_min => 1, level_max => 19, threads => '-T' },
|
||||||
);
|
);
|
||||||
|
|
||||||
my $compress_format_alt = join '|', map { $_->{format} } values %compression; # note: this contains duplicate alternations
|
my $compress_format_alt = join '|', map { $_->{format} } values %compression; # note: this contains duplicate alternations
|
||||||
|
|
|
@ -290,7 +290,7 @@ option in ssh_config(5).
|
||||||
remote locations. Defaults to ``no''. If enabled, make sure that
|
remote locations. Defaults to ``no''. If enabled, make sure that
|
||||||
'<compress_command>' is available on the source and target
|
'<compress_command>' is available on the source and target
|
||||||
hosts. Supported '<compress_command>': gzip, pigz, bzip2, pbzip2,
|
hosts. Supported '<compress_command>': gzip, pigz, bzip2, pbzip2,
|
||||||
xz, lzo, lz4.
|
xz, lzo, lz4, zstd.
|
||||||
|
|
||||||
*stream_compress_level* default|<number>::
|
*stream_compress_level* default|<number>::
|
||||||
Compression level for the specified '<compress_command>'. Refer to
|
Compression level for the specified '<compress_command>'. Refer to
|
||||||
|
@ -300,7 +300,7 @@ option in ssh_config(5).
|
||||||
|
|
||||||
*stream_compress_threads* default|<number>::
|
*stream_compress_threads* default|<number>::
|
||||||
Number of threads to use for <compress_command>. Only supported
|
Number of threads to use for <compress_command>. Only supported
|
||||||
for "pigz", "pbzip2" and recent versions of "xz".
|
for "pigz", "pbzip2", "zstd" and recent versions of "xz".
|
||||||
|
|
||||||
*stream_buffer* <size>|no::
|
*stream_buffer* <size>|no::
|
||||||
Add a buffer to the btrfs send stream (locally, on uncompressed
|
Add a buffer to the btrfs send stream (locally, on uncompressed
|
||||||
|
@ -565,7 +565,8 @@ Additional options for raw targets:
|
||||||
|
|
||||||
*raw_target_compress* <compress_command>|no::
|
*raw_target_compress* <compress_command>|no::
|
||||||
Compression algorithm to use for raw backup target. Supported
|
Compression algorithm to use for raw backup target. Supported
|
||||||
'<compress_command>': gzip, pigz, bzip2, pbzip2, xz, lzo, lz4.
|
'<compress_command>': gzip, pigz, bzip2, pbzip2, xz, lzo, lz4,
|
||||||
|
zstd.
|
||||||
*raw_target_compress_level* default|<number>::
|
*raw_target_compress_level* default|<number>::
|
||||||
Compression level for the specified <compress_command>.
|
Compression level for the specified <compress_command>.
|
||||||
*raw_target_compress_threads* default|<number>::
|
*raw_target_compress_threads* default|<number>::
|
||||||
|
|
|
@ -12,7 +12,7 @@ allow_exact_list=
|
||||||
allow_rate_limit=1
|
allow_rate_limit=1
|
||||||
allow_stream_buffer=1
|
allow_stream_buffer=1
|
||||||
allow_compress=1
|
allow_compress=1
|
||||||
compress_list="gzip|pigz|bzip2|pbzip2|xz|lzop|lz4"
|
compress_list="gzip|pigz|bzip2|pbzip2|xz|lzop|lz4|zstd"
|
||||||
|
|
||||||
# note that the backslash is NOT a metacharacter in a POSIX bracket expression!
|
# note that the backslash is NOT a metacharacter in a POSIX bracket expression!
|
||||||
option_match='-[a-zA-Z0-9=-]+' # matches short as well as long options
|
option_match='-[a-zA-Z0-9=-]+' # matches short as well as long options
|
||||||
|
|
Loading…
Reference in New Issue