options.go raw
1 /*
2 * SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6 package options
7
8 // ChecksumVerificationMode tells when should DB verify checksum for SSTable blocks.
9 type ChecksumVerificationMode int
10
11 const (
12 // NoVerification indicates DB should not verify checksum for SSTable blocks.
13 NoVerification ChecksumVerificationMode = iota
14 // OnTableRead indicates checksum should be verified while opening SSTtable.
15 OnTableRead
16 // OnBlockRead indicates checksum should be verified on every SSTable block read.
17 OnBlockRead
18 // OnTableAndBlockRead indicates checksum should be verified
19 // on SSTable opening and on every block read.
20 OnTableAndBlockRead
21 )
22
23 // CompressionType specifies how a block should be compressed.
24 type CompressionType uint32
25
26 const (
27 // None mode indicates that a block is not compressed.
28 None CompressionType = 0
29 // Snappy mode indicates that a block is compressed using Snappy algorithm.
30 Snappy CompressionType = 1
31 // ZSTD mode indicates that a block is compressed using ZSTD algorithm.
32 ZSTD CompressionType = 2
33 )
34