Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

35 lignes
897 B

  1. // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file. See the AUTHORS file for names of contributors.
  4. //
  5. // Log format information shared by reader and writer.
  6. // See ../doc/log_format.txt for more detail.
  7. #ifndef STORAGE_LEVELDB_DB_LOG_FORMAT_H_
  8. #define STORAGE_LEVELDB_DB_LOG_FORMAT_H_
  9. namespace leveldb {
  10. namespace log {
  11. enum RecordType {
  12. // Zero is reserved for preallocated files
  13. kZeroType = 0,
  14. kFullType = 1,
  15. // For fragments
  16. kFirstType = 2,
  17. kMiddleType = 3,
  18. kLastType = 4
  19. };
  20. static const int kMaxRecordType = kLastType;
  21. static const int kBlockSize = 32768;
  22. // Header is checksum (4 bytes), type (1 byte), length (2 bytes).
  23. static const int kHeaderSize = 4 + 1 + 2;
  24. } // namespace log
  25. } // namespace leveldb
  26. #endif // STORAGE_LEVELDB_DB_LOG_FORMAT_H_