options.go 1.1 KB

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