pub enum CompressionMode {
None,
Lz4,
Zstd(u8),
Zlib(u8),
Lzma(u8),
}
Expand description
The compression modes of an archive.
The compression modes auto
and obfuscate
are currently not supported by this library.
Variants§
None
No compression
Lz4
Use lz4 compression. Very high speed, very low compression.
Zstd(u8)
Use zstd (“zstandard”) compression, a modern wide-range algorithm.
Allowed values ranging from 1 to 22, where 1 is the fastest and 22 the highest compressing.
Archives compressed with zstd are not compatible with borg < 1.1.4.
Zlib(u8)
Use zlib (“gz”) compression. Medium speed, medium compression.
Allowed values ranging from 0 to 9. Giving level 0 (means “no compression”, but still has zlib protocol overhead) is usually pointless, you better use CompressionMode::None compression.
Lzma(u8)
Use lzma (“xz”) compression. Low speed, high compression.
Allowed values ranging from 0 to 9. Giving levels above 6 is pointless and counterproductive because it does not compress better due to the buffer size used by borg - but it wastes lots of CPU cycles and RAM.
Trait Implementations§
Source§impl Clone for CompressionMode
impl Clone for CompressionMode
Source§fn clone(&self) -> CompressionMode
fn clone(&self) -> CompressionMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more