update zstd to 0.12

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2023-01-04 15:17:02 +01:00 committed by Andrew A. Vasilyev
parent 6a8f0086b3
commit c16ff12f40
3 changed files with 4 additions and 4 deletions

4
debian/control vendored
View File

@ -127,8 +127,8 @@ Build-Depends: debhelper (>= 12),
librust-url-2+default-dev (>= 2.1-~~),
librust-walkdir-2+default-dev,
librust-xdg-2+default-dev (>= 2.2-~~),
librust-zstd-0.6+bindgen-dev,
librust-zstd-0.6+default-dev,
librust-zstd-0.12+bindgen-dev,
librust-zstd-0.12+default-dev,
libacl1-dev,
libfuse3-dev,
libsystemd-dev (>= 246-~~),

View File

@ -35,7 +35,7 @@ fn main() -> Result<(), Error> {
});
rate_test("zstd", &|| {
zstd::block::compress(&input, 1).unwrap();
zstd::bulk::compress(&input, 1).unwrap();
input.len()
});

View File

@ -96,7 +96,7 @@ impl DataBlob {
let mut blob = if let Some(config) = config {
let compr_data;
let (_compress, data, magic) = if compress {
compr_data = zstd::block::compress(data, 1)?;
compr_data = zstd::bulk::compress(data, 1)?;
// Note: We only use compression if result is shorter
if compr_data.len() < data.len() {
(true, &compr_data[..], ENCR_COMPR_BLOB_MAGIC_1_0)