Skip to content

Commit 83151a8

Browse files
jevolkzaidoon1
authored andcommitted
add set_use_delta_encoding() to Options
Signed-off-by: Jason Volk <[email protected]>
1 parent a7eb62d commit 83151a8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: src/db_options.rs

+13
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,19 @@ impl BlockBasedOptions {
720720
}
721721
}
722722

723+
/// Use delta encoding to compress keys in blocks.
724+
/// ReadOptions::pin_data requires this option to be disabled.
725+
///
726+
/// Default: true
727+
pub fn set_use_delta_encoding(&mut self, enable: bool) {
728+
unsafe {
729+
ffi::rocksdb_block_based_options_set_use_delta_encoding(
730+
self.inner,
731+
c_uchar::from(enable),
732+
);
733+
}
734+
}
735+
723736
/// Number of keys between restart points for delta encoding of keys.
724737
/// This parameter can be changed dynamically. Most clients should
725738
/// leave this parameter alone. The minimum value allowed is 1. Any smaller

0 commit comments

Comments
 (0)