diff --git a/Cargo.toml b/Cargo.toml index 20c1e9c81..e58e6c33c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -150,7 +150,7 @@ udev = "0.4" url = "2.1" walkdir = "2" xdg = "2.2" -zstd = { version = "0.6", features = [ "bindgen" ] } +zstd = { version = ">= 0.6, < 0.13", features = [ "bindgen" ] } [dependencies] anyhow.workspace = true diff --git a/debian/control b/debian/control index 596b049e0..668e63c50 100644 --- a/debian/control +++ b/debian/control @@ -127,8 +127,8 @@ Build-Depends: debhelper-compat (= 13), 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-~~), diff --git a/examples/cipherbench.rs b/examples/cipherbench.rs index 2e4db501c..03f2bcd83 100644 --- a/examples/cipherbench.rs +++ b/examples/cipherbench.rs @@ -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() }); diff --git a/pbs-datastore/src/data_blob.rs b/pbs-datastore/src/data_blob.rs index f37c7a344..4119c4a4b 100644 --- a/pbs-datastore/src/data_blob.rs +++ b/pbs-datastore/src/data_blob.rs @@ -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)