Skip to content

Commit

Permalink
Bump zstd to 0.13.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gyscos committed Mar 27, 2024
1 parent 3ca5f62 commit e470f00
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ categories = ["compression", "api-bindings"]
license = "MIT"
name = "zstd"
repository = "https://github.com/gyscos/zstd-rs"
version = "0.13.0"
version = "0.13.1"
exclude = ["assets/*.zst", "/.github"]
readme = "Readme.md"
edition = "2018"
Expand All @@ -20,7 +20,7 @@ features = ["experimental", "zstdmt", "zdict_builder", "doc-cfg"]
travis-ci = { repository = "gyscos/zstd-rs" }

[dependencies]
zstd-safe = { path = "zstd-safe", version = "7.0.0", default-features = false, features = ["std"] }
zstd-safe = { path = "zstd-safe", version = "7.1.0", default-features = false, features = ["std"] }

[dev-dependencies]
clap = {version = "4.0", features=["derive"]}
Expand Down
16 changes: 16 additions & 0 deletions src/stream/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,22 @@ macro_rules! encoder_parameters {
)
}

/// Sets the target size for compressed blocks.
///
/// A lower block size may result in slightly lower speed (~2%) and compression ratio
/// (~0.1%), but may decrease end-to-end latency in low-bandwidth environments (time to
/// first decompressed byte).
///
/// No value, or a value of zero, results in no contraint for the block sizes.
pub fn set_target_cblock_size(
&mut self,
target_size: Option<u32>,
) -> io::Result<()> {
self.set_parameter(zstd_safe::CParameter::TargetCBlockSize(
target_size.unwrap_or(0),
))
}

/// Sets the maximum back-reference distance.
///
/// The actual maximum distance is going to be `2^log_distance`.
Expand Down

0 comments on commit e470f00

Please sign in to comment.