|
|
@ -286,13 +286,24 @@ impl Options { |
|
|
|
/// So users of this feature may see increased memory usage.
|
|
|
|
/// So users of this feature may see increased memory usage.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// Default: `0`
|
|
|
|
/// Default: `0`
|
|
|
|
pub fn set_compression_options(&mut self, w_bits: c_int, level: c_int, strategy: c_int, max_dict_bytes: c_int) { |
|
|
|
pub fn set_compression_options( |
|
|
|
|
|
|
|
&mut self, |
|
|
|
|
|
|
|
w_bits: c_int, |
|
|
|
|
|
|
|
level: c_int, |
|
|
|
|
|
|
|
strategy: c_int, |
|
|
|
|
|
|
|
max_dict_bytes: c_int, |
|
|
|
|
|
|
|
) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_compression_options(self.inner, w_bits, level, strategy, max_dict_bytes); |
|
|
|
ffi::rocksdb_options_set_compression_options( |
|
|
|
|
|
|
|
self.inner, |
|
|
|
|
|
|
|
w_bits, |
|
|
|
|
|
|
|
level, |
|
|
|
|
|
|
|
strategy, |
|
|
|
|
|
|
|
max_dict_bytes, |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// If non-zero, we perform bigger reads when doing compaction. If you're
|
|
|
|
/// If non-zero, we perform bigger reads when doing compaction. If you're
|
|
|
|
/// running RocksDB on spinning disks, you should set this to at least 2MB.
|
|
|
|
/// running RocksDB on spinning disks, you should set this to at least 2MB.
|
|
|
|
/// That way RocksDB's compaction is doing sequential instead of random reads.
|
|
|
|
/// That way RocksDB's compaction is doing sequential instead of random reads.
|
|
|
|