mirror of
https://github.com/gyscos/zstd-rs
synced 2024-10-18 13:52:51 +00:00
Support the new long-distance matcher (#117)
zstd 1.3.2 added a long-distance matcher (https://github.com/facebook/zstd/releases/tag/v1.3.2); add a function to set that parameter.
This commit is contained in:
parent
4ecd2b6ab7
commit
17b984195e
|
@ -74,6 +74,18 @@ macro_rules! readwritecommon {
|
|||
)
|
||||
}
|
||||
|
||||
/// Enables or disables long-distance matching
|
||||
pub fn long_distance_matching(
|
||||
&mut self,
|
||||
long_distance_matching: bool,
|
||||
) -> io::Result<()> {
|
||||
self.$readwrite.operation_mut().set_parameter(
|
||||
zstd_safe::CParameter::EnableLongDistanceMatching(
|
||||
long_distance_matching,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
#[cfg(feature = "experimental")]
|
||||
/// Enables or disable the magic bytes at the beginning of each frame.
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue