func (opts *Options) SetManifestPreallocationSize(value int) {
	C.rocksdb_options_set_manifest_preallocation_size(opts.c, C.size_t(value))
}
SetManifestPreallocationSize sets the number of bytes
to preallocate (via fallocate) the manifest files.

Default is 4mb, which is reasonable to reduce random IO
as well as prevent overallocation for mounts that preallocate
large amounts of data (such as xfs's allocsize option).
Default: 4mb
package gorocksdb
import "C"
import "unsafe"
type CompressionType uint
const (
	NoCompression     = CompressionType(C.rocksdb_no_compression)
	SnappyCompression = CompressionType(C.rocksdb_snappy_compression)
	ZLibCompression   = CompressionType(C.rocksdb_zlib_compression)
	Bz2Compression    = CompressionType(C.rocksdb_bz2_compression)
	LZ4Compression    = CompressionType(C.rocksdb_lz4_compression)
	LZ4HCCompression  = CompressionType(C.rocksdb_lz4hc_compression)
	XpressCompression = CompressionType(C.rocksdb_xpress_compression)
	ZSTDCompression   = CompressionType(C.rocksdb_zstd_compression)
)
type CompactionStyle uint
const (
	LevelCompactionStyle     = CompactionStyle(C.rocksdb_level_compaction)
	UniversalCompactionStyle = CompactionStyle(C.rocksdb_universal_compaction)
	FIFOCompactionStyle      = CompactionStyle(C.rocksdb_fifo_compaction)
)
type CompactionAccessPattern uint
const (
	NoneCompactionAccessPattern       = CompactionAccessPattern(0)
	NormalCompactionAccessPattern     = CompactionAccessPattern(1)
	SequentialCompactionAccessPattern = CompactionAccessPattern(2)
	WillneedCompactionAccessPattern   = CompactionAccessPattern(3)
)
type InfoLogLevel uint
const (
	DebugInfoLogLevel = InfoLogLevel(0)
	InfoInfoLogLevel  = InfoLogLevel(1)
	WarnInfoLogLevel  = InfoLogLevel(2)
	ErrorInfoLogLevel = InfoLogLevel(3)
	FatalInfoLogLevel = InfoLogLevel(4)
)
type Options struct {
	c *C.rocksdb_options_t
	env  *Env
	bbto *BlockBasedTableOptions
	ccmp *C.rocksdb_comparator_t
	cmo  *C.rocksdb_mergeoperator_t
	cst  *C.rocksdb_slicetransform_t
	ccf  *C.rocksdb_compactionfilter_t
}
func NewDefaultOptions() *Options {
	return NewNativeOptions(C.rocksdb_options_create())
}
func NewNativeOptions(c *C.rocksdb_options_t) *Options {
	return &Options{c: c}
}
func (opts *Options) SetCompactionFilter(value CompactionFilter) {
	if nc, ok := value.(nativeCompactionFilter); ok {
		opts.ccf = nc.c
	} else {
		idx := registerCompactionFilter(value)
		opts.ccf = C.gorocksdb_compactionfilter_create(C.uintptr_t(idx))
	}
	C.rocksdb_options_set_compaction_filter(opts.c, opts.ccf)
}
func (opts *Options) SetComparator(value Comparator) {
	if nc, ok := value.(nativeComparator); ok {
		opts.ccmp = nc.c
	} else {
		idx := registerComperator(value)
		opts.ccmp = C.gorocksdb_comparator_create(C.uintptr_t(idx))
	}
	C.rocksdb_options_set_comparator(opts.c, opts.ccmp)
}
func (opts *Options) SetMergeOperator(value MergeOperator) {
	if nmo, ok := value.(nativeMergeOperator); ok {
		opts.cmo = nmo.c
	} else {
		idx := registerMergeOperator(value)
		opts.cmo = C.gorocksdb_mergeoperator_create(C.uintptr_t(idx))
	}
	C.rocksdb_options_set_merge_operator(opts.c, opts.cmo)
}
func (opts *Options) SetCreateIfMissing(value bool) {
	C.rocksdb_options_set_create_if_missing(opts.c, boolToChar(value))
}
func (opts *Options) SetErrorIfExists(value bool) {
	C.rocksdb_options_set_error_if_exists(opts.c, boolToChar(value))
}
func (opts *Options) SetParanoidChecks(value bool) {
	C.rocksdb_options_set_paranoid_checks(opts.c, boolToChar(value))
}
func (opts *Options) SetDBPaths(dbpaths []*DBPath) {
	l := len(dbpaths)
	cDbpaths := make([]*C.rocksdb_dbpath_t, l)
	for i, v := range dbpaths {
		cDbpaths[i] = v.c
	}
	C.rocksdb_options_set_db_paths(opts.c, &cDbpaths[0], C.size_t(l))
}
func (opts *Options) SetEnv(value *Env) {
	opts.env = value
	C.rocksdb_options_set_env(opts.c, value.c)
}
func (opts *Options) SetInfoLogLevel(value InfoLogLevel) {
	C.rocksdb_options_set_info_log_level(opts.c, C.int(value))
}
func (opts *Options) IncreaseParallelism(total_threads int) {
	C.rocksdb_options_increase_parallelism(opts.c, C.int(total_threads))
}
func (opts *Options) OptimizeForPointLookup(block_cache_size_mb uint64) {
	C.rocksdb_options_optimize_for_point_lookup(opts.c, C.uint64_t(block_cache_size_mb))
}
func (opts *Options) SetAllowConcurrentMemtableWrites(allow bool) {
	C.rocksdb_options_set_allow_concurrent_memtable_write(opts.c, boolToChar(allow))
}
func (opts *Options) OptimizeLevelStyleCompaction(memtable_memory_budget uint64) {
	C.rocksdb_options_optimize_level_style_compaction(opts.c, C.uint64_t(memtable_memory_budget))
}
func (opts *Options) OptimizeUniversalStyleCompaction(memtable_memory_budget uint64) {
	C.rocksdb_options_optimize_universal_style_compaction(opts.c, C.uint64_t(memtable_memory_budget))
}
func (opts *Options) SetWriteBufferSize(value int) {
	C.rocksdb_options_set_write_buffer_size(opts.c, C.size_t(value))
}
func (opts *Options) SetMaxWriteBufferNumber(value int) {
	C.rocksdb_options_set_max_write_buffer_number(opts.c, C.int(value))
}
func (opts *Options) SetMinWriteBufferNumberToMerge(value int) {
	C.rocksdb_options_set_min_write_buffer_number_to_merge(opts.c, C.int(value))
}
func (opts *Options) SetMaxOpenFiles(value int) {
	C.rocksdb_options_set_max_open_files(opts.c, C.int(value))
}
func (opts *Options) SetMaxFileOpeningThreads(value int) {
	C.rocksdb_options_set_max_file_opening_threads(opts.c, C.int(value))
}
func (opts *Options) SetMaxTotalWalSize(value uint64) {
	C.rocksdb_options_set_max_total_wal_size(opts.c, C.uint64_t(value))
}
func (opts *Options) SetCompression(value CompressionType) {
	C.rocksdb_options_set_compression(opts.c, C.int(value))
}
func (opts *Options) SetCompressionPerLevel(value []CompressionType) {
	cLevels := make([]C.int, len(value))
	for i, v := range value {
		cLevels[i] = C.int(v)
	}
	C.rocksdb_options_set_compression_per_level(opts.c, &cLevels[0], C.size_t(len(value)))
}
func (opts *Options) SetMinLevelToCompress(value int) {
	C.rocksdb_options_set_min_level_to_compress(opts.c, C.int(value))
}
func (opts *Options) SetCompressionOptions(value *CompressionOptions) {
	C.rocksdb_options_set_compression_options(opts.c, C.int(value.WindowBits), C.int(value.Level), C.int(value.Strategy), C.int(value.MaxDictBytes))
}
func (opts *Options) SetPrefixExtractor(value SliceTransform) {
	if nst, ok := value.(nativeSliceTransform); ok {
		opts.cst = nst.c
	} else {
		idx := registerSliceTransform(value)
		opts.cst = C.gorocksdb_slicetransform_create(C.uintptr_t(idx))
	}
	C.rocksdb_options_set_prefix_extractor(opts.c, opts.cst)
}
func (opts *Options) SetNumLevels(value int) {
	C.rocksdb_options_set_num_levels(opts.c, C.int(value))
}
func (opts *Options) SetLevel0FileNumCompactionTrigger(value int) {
	C.rocksdb_options_set_level0_file_num_compaction_trigger(opts.c, C.int(value))
}
func (opts *Options) SetLevel0SlowdownWritesTrigger(value int) {
	C.rocksdb_options_set_level0_slowdown_writes_trigger(opts.c, C.int(value))
}
func (opts *Options) SetLevel0StopWritesTrigger(value int) {
	C.rocksdb_options_set_level0_stop_writes_trigger(opts.c, C.int(value))
}
func (opts *Options) SetMaxMemCompactionLevel(value int) {
	C.rocksdb_options_set_max_mem_compaction_level(opts.c, C.int(value))
}
func (opts *Options) SetTargetFileSizeBase(value uint64) {
	C.rocksdb_options_set_target_file_size_base(opts.c, C.uint64_t(value))
}
func (opts *Options) SetTargetFileSizeMultiplier(value int) {
	C.rocksdb_options_set_target_file_size_multiplier(opts.c, C.int(value))
}
func (opts *Options) SetMaxBytesForLevelBase(value uint64) {
	C.rocksdb_options_set_max_bytes_for_level_base(opts.c, C.uint64_t(value))
}
func (opts *Options) SetMaxBytesForLevelMultiplier(value float64) {
	C.rocksdb_options_set_max_bytes_for_level_multiplier(opts.c, C.double(value))
}
func (opts *Options) SetLevelCompactionDynamicLevelBytes(value bool) {
	C.rocksdb_options_set_level_compaction_dynamic_level_bytes(opts.c, boolToChar(value))
}
func (opts *Options) SetMaxCompactionBytes(value uint64) {
	C.rocksdb_options_set_max_compaction_bytes(opts.c, C.uint64_t(value))
}
func (opts *Options) SetSoftPendingCompactionBytesLimit(value uint64) {
	C.rocksdb_options_set_soft_pending_compaction_bytes_limit(opts.c, C.size_t(value))
}
func (opts *Options) SetHardPendingCompactionBytesLimit(value uint64) {
	C.rocksdb_options_set_hard_pending_compaction_bytes_limit(opts.c, C.size_t(value))
}
func (opts *Options) SetMaxBytesForLevelMultiplierAdditional(value []int) {
	cLevels := make([]C.int, len(value))
	for i, v := range value {
		cLevels[i] = C.int(v)
	}
	C.rocksdb_options_set_max_bytes_for_level_multiplier_additional(opts.c, &cLevels[0], C.size_t(len(value)))
}
func (opts *Options) SetUseFsync(value bool) {
	C.rocksdb_options_set_use_fsync(opts.c, C.int(btoi(value)))
}
func (opts *Options) SetDbLogDir(value string) {
	cvalue := C.CString(value)
	defer C.free(unsafe.Pointer(cvalue))
	C.rocksdb_options_set_db_log_dir(opts.c, cvalue)
}
func (opts *Options) SetWalDir(value string) {
	cvalue := C.CString(value)
	defer C.free(unsafe.Pointer(cvalue))
	C.rocksdb_options_set_wal_dir(opts.c, cvalue)
}
func (opts *Options) SetDeleteObsoleteFilesPeriodMicros(value uint64) {
	C.rocksdb_options_set_delete_obsolete_files_period_micros(opts.c, C.uint64_t(value))
}
func (opts *Options) SetMaxBackgroundCompactions(value int) {
	C.rocksdb_options_set_max_background_compactions(opts.c, C.int(value))
}
func (opts *Options) SetMaxBackgroundFlushes(value int) {
	C.rocksdb_options_set_max_background_flushes(opts.c, C.int(value))
}
func (opts *Options) SetMaxLogFileSize(value int) {
	C.rocksdb_options_set_max_log_file_size(opts.c, C.size_t(value))
}
func (opts *Options) SetLogFileTimeToRoll(value int) {
	C.rocksdb_options_set_log_file_time_to_roll(opts.c, C.size_t(value))
}
func (opts *Options) SetKeepLogFileNum(value int) {
	C.rocksdb_options_set_keep_log_file_num(opts.c, C.size_t(value))
}
func (opts *Options) SetSoftRateLimit(value float64) {
	C.rocksdb_options_set_soft_rate_limit(opts.c, C.double(value))
}
func (opts *Options) SetHardRateLimit(value float64) {
	C.rocksdb_options_set_hard_rate_limit(opts.c, C.double(value))
}
func (opts *Options) SetRateLimitDelayMaxMilliseconds(value uint) {
	C.rocksdb_options_set_rate_limit_delay_max_milliseconds(opts.c, C.uint(value))
}
func (opts *Options) SetMaxManifestFileSize(value uint64) {
	C.rocksdb_options_set_max_manifest_file_size(opts.c, C.size_t(value))
}
func (opts *Options) SetTableCacheNumshardbits(value int) {
	C.rocksdb_options_set_table_cache_numshardbits(opts.c, C.int(value))
}
func (opts *Options) SetTableCacheRemoveScanCountLimit(value int) {
	C.rocksdb_options_set_table_cache_remove_scan_count_limit(opts.c, C.int(value))
}
func (opts *Options) SetArenaBlockSize(value int) {
	C.rocksdb_options_set_arena_block_size(opts.c, C.size_t(value))
}
func (opts *Options) SetDisableAutoCompactions(value bool) {
	C.rocksdb_options_set_disable_auto_compactions(opts.c, C.int(btoi(value)))
}
func (opts *Options) SetWALTtlSeconds(value uint64) {
	C.rocksdb_options_set_WAL_ttl_seconds(opts.c, C.uint64_t(value))
}
func (opts *Options) SetWalSizeLimitMb(value uint64) {
	C.rocksdb_options_set_WAL_size_limit_MB(opts.c, C.uint64_t(value))
}