Enum Compression
- Namespace
- RocksDbNet
- Assembly
- RocksDb.Net.dll
Compression algorithm used by RocksDb.
public enum Compression
Fields
Bz2 = 3Bzip2. Strong ratios but slow enough that it is rarely the right choice for live data.
Inherit = 255Inherit 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, aswitchover it fell through, and a caller who had set an algorithm could not restore the default.Lz4 = 4LZ4. Comparable ratios to Snappy and usually faster; a good default for the upper levels.
Lz4Hc = 5LZ4 in high-compression mode. Compresses harder and slower than Lz4 while decompressing just as fast, which suits data written once and read often.
None = 0No compression. Fastest, largest on disk.
Snappy = 1Snappy. Fast with modest ratios, and the traditional default.
Xpress = 6Microsoft Xpress. Available only where the platform provides it, so not portable.
Zlib = 2Zlib. Better ratios than Snappy at a noticeably higher CPU cost.
Zstd = 7Zstandard. The usual choice for the bottommost level: ratios near Zlib with decompression closer to Lz4.