mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-01-06 13:18:00 +03:00
update zstd to 0.12
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
ed6eb52acd
commit
4341a3f0cc
@ -150,7 +150,7 @@ udev = "0.4"
|
|||||||
url = "2.1"
|
url = "2.1"
|
||||||
walkdir = "2"
|
walkdir = "2"
|
||||||
xdg = "2.2"
|
xdg = "2.2"
|
||||||
zstd = { version = "0.6", features = [ "bindgen" ] }
|
zstd = { version = ">= 0.6, < 0.13", features = [ "bindgen" ] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
|
4
debian/control
vendored
4
debian/control
vendored
@ -127,8 +127,8 @@ Build-Depends: debhelper-compat (= 13),
|
|||||||
librust-url-2+default-dev (>= 2.1-~~),
|
librust-url-2+default-dev (>= 2.1-~~),
|
||||||
librust-walkdir-2+default-dev,
|
librust-walkdir-2+default-dev,
|
||||||
librust-xdg-2+default-dev (>= 2.2-~~),
|
librust-xdg-2+default-dev (>= 2.2-~~),
|
||||||
librust-zstd-0.6+bindgen-dev,
|
librust-zstd-0.12+bindgen-dev,
|
||||||
librust-zstd-0.6+default-dev,
|
librust-zstd-0.12+default-dev,
|
||||||
libacl1-dev,
|
libacl1-dev,
|
||||||
libfuse3-dev,
|
libfuse3-dev,
|
||||||
libsystemd-dev (>= 246-~~),
|
libsystemd-dev (>= 246-~~),
|
||||||
|
@ -35,7 +35,7 @@ fn main() -> Result<(), Error> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
rate_test("zstd", &|| {
|
rate_test("zstd", &|| {
|
||||||
zstd::block::compress(&input, 1).unwrap();
|
zstd::bulk::compress(&input, 1).unwrap();
|
||||||
input.len()
|
input.len()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ impl DataBlob {
|
|||||||
let mut blob = if let Some(config) = config {
|
let mut blob = if let Some(config) = config {
|
||||||
let compr_data;
|
let compr_data;
|
||||||
let (_compress, data, magic) = if compress {
|
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
|
// Note: We only use compression if result is shorter
|
||||||
if compr_data.len() < data.len() {
|
if compr_data.len() < data.len() {
|
||||||
(true, &compr_data[..], ENCR_COMPR_BLOB_MAGIC_1_0)
|
(true, &compr_data[..], ENCR_COMPR_BLOB_MAGIC_1_0)
|
||||||
|
Loading…
Reference in New Issue
Block a user