Back to Top

leveldb 源码分析

本来想深入看一下, 但因为没有带着问题, 所以有点看不进去

leveldb::Status

leveldb::Status 既保证了效率, 又有好的扩展性.

  // OK status has a null state_.  Otherwise, state_ is a new[] array
  // of the following form:
  //    state_[0..3] == length of message
  //    state_[4]    == code
  //    state_[5..]  == message
  const char* state_;

leveldb::

leveldb::BlockBuilder 压缩的kv存储, 对于有序的key, 如果存在重复则能压缩其占用

leveldb::TableBuilder

本文链接, 未经许可,禁止转载