diff --git a/Cargo.toml b/Cargo.toml index ccf9541..8e03ae2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,10 +29,10 @@ name = "create_test_db" required-features = ["benchmark"] [lib] -crate-type = ["cdylib"] +crate-type = ["lib", "cdylib"] [dependencies] -zstd = {version = "0.11.2", features = ["experimental"]} +zstd = {version = "0.13.1", features = ["experimental"]} #zstd = {version = "0.5.3", path="../zstd-rs"} #zstd = {version = "=0.5.4"} anyhow = "1.0.44" @@ -54,6 +54,11 @@ features = ["functions", "blob", "bundled", "array"] package = "rusqlite-le" version = "0.24.2" +[patch.crates-io.rusqlite] +features = ["functions", "blob", "bundled", "array"] +git = "https://github.com/rusqlite/rusqlite.git" +tag = "v0.31.0" + [dev-dependencies] chrono = "0.4.19" names = "0.14.0" diff --git a/src/basic.rs b/src/basic.rs index 22a5844..488e309 100644 --- a/src/basic.rs +++ b/src/basic.rs @@ -89,7 +89,7 @@ fn zstd_compress_fn_tail<'a>( { // pledge source size (benchmarking shows this doesn't help any tho) let cctx = encoder.context_mut(); - cctx.set_pledged_src_size(input_value.len() as u64) + cctx.set_pledged_src_size(Some(input_value.len() as u64)) .map_err(|c| anyhow::anyhow!("setting pledged source size (code {c})"))?; // cctx.set_parameter(zstd::zstd_safe::CParameter::BlockDelimiters(false)) // .map_err(|_| anyhow::anyhow!("no"))?; diff --git a/src/lib.rs b/src/lib.rs index 7655e36..7559280 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,7 @@ #![warn(clippy::print_stdout)] +pub extern crate rusqlite; + use rusqlite::Connection; use util::init_logging;