Table of Contents

Enum Compression

Namespace
RocksDbNet
Assembly
RocksDb.Net.dll

Compression algorithm used by RocksDb.

public enum Compression

Fields

Bz2 = 3

Bzip2. Strong ratios but slow enough that it is rarely the right choice for live data.

Inherit = 255

Inherit the setting rather than choose an algorithm. The default of BottommostCompression, where it means "use Compression".

kDisableCompressionOption. Distinct from None, which selects no compression: this selects nothing at all. Without it the default was not expressible, so reading BottommostCompression on fresh options returned a value no member matched, a switch over it fell through, and a caller who had set an algorithm could not restore the default.

Lz4 = 4

LZ4. Comparable ratios to Snappy and usually faster; a good default for the upper levels.

Lz4Hc = 5

LZ4 in high-compression mode. Compresses harder and slower than Lz4 while decompressing just as fast, which suits data written once and read often.

None = 0

No compression. Fastest, largest on disk.

Snappy = 1

Snappy. Fast with modest ratios, and the traditional default.

Xpress = 6

Microsoft Xpress. Available only where the platform provides it, so not portable.

Zlib = 2

Zlib. Better ratios than Snappy at a noticeably higher CPU cost.

Zstd = 7

Zstandard. The usual choice for the bottommost level: ratios near Zlib with decompression closer to Lz4.