Skip to content

Commit

Permalink
Bump new version for rocksdb 6.11.4
Browse files Browse the repository at this point in the history
  • Loading branch information
linxGnu committed Jul 21, 2020
1 parent 73a536f commit f9d29f9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 13 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
dist: bionic
language: go
go:
- 1.11.x
- 1.12.x
- 1.13.x
- 1.14.x

install:
- go get -u github.com/mattn/goveralls
Expand Down
38 changes: 27 additions & 11 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,17 +492,6 @@ func (opts *Options) SetBottommostCompression(value CompressionType) {
C.rocksdb_options_set_bottommost_compression(opts.c, C.int(value))
}

// TODO(linxGnu):
// extern ROCKSDB_LIBRARY_API void
// rocksdb_options_set_compression_options_zstd_max_train_bytes(rocksdb_options_t*,
// int);
// extern ROCKSDB_LIBRARY_API void
// rocksdb_options_set_bottommost_compression_options(rocksdb_options_t*, int, int,
// int, int, unsigned char);
// extern ROCKSDB_LIBRARY_API void
// rocksdb_options_set_bottommost_compression_options_zstd_max_train_bytes(
// rocksdb_options_t*, int, unsigned char);

// SetCompressionPerLevel sets different compression algorithm per level.
//
// Different levels can have different compression policies. There
Expand All @@ -521,6 +510,33 @@ func (opts *Options) SetCompressionPerLevel(value []CompressionType) {
C.rocksdb_options_set_compression_per_level(opts.c, &cLevels[0], C.size_t(len(value)))
}

// SetCompressionOptionsZstdMaxTrainBytes sets maximum size of training data passed
// to zstd's dictionary trainer. Using zstd's dictionary trainer can achieve even
// better compression ratio improvements than using `max_dict_bytes` alone.
//
// The training data will be used to generate a dictionary of max_dict_bytes.
//
// Default: 0.
func (opts *Options) SetCompressionOptionsZstdMaxTrainBytes(value int) {
C.rocksdb_options_set_compression_options_zstd_max_train_bytes(opts.c, C.int(value))
}

// SetBottommostCompressionOptions sets different options for compression algorithms, for bottommost.
//
// `enabled` true to use these compression options.
func (opts *Options) SetBottommostCompressionOptions(value *CompressionOptions, enabled bool) {
C.rocksdb_options_set_bottommost_compression_options(opts.c, C.int(value.WindowBits), C.int(value.Level), C.int(value.Strategy), C.int(value.MaxDictBytes), boolToChar(enabled))
}

// SetBottommostCompressionOptionsZstdMaxTrainBytes sets maximum size of training data passed
// to zstd's dictionary trainer for bottommost level. Using zstd's dictionary trainer can achieve even
// better compression ratio improvements than using `max_dict_bytes` alone.
//
// `enabled` true to use these compression options.
func (opts *Options) SetBottommostCompressionOptionsZstdMaxTrainBytes(value int, enabled bool) {
C.rocksdb_options_set_bottommost_compression_options_zstd_max_train_bytes(opts.c, C.int(value), boolToChar(enabled))
}

// SetMinLevelToCompress sets the start level to use compression.
func (opts *Options) SetMinLevelToCompress(value int) {
C.rocksdb_options_set_min_level_to_compress(opts.c, C.int(value))
Expand Down

0 comments on commit f9d29f9

Please sign in to comment.