We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sstable 一章中介绍“data block 结构”的例子中,第二个 restart point 的值应为 17 而不是 16。错误的图片如下:
验证代码:
#include <cctype> #include <iostream> #include "leveldb/options.h" #include "table/block_builder.h" int main() { leveldb::Options options; options.block_restart_interval = 2; leveldb::BlockBuilder builder(&options); builder.Add("deck", "v1"); builder.Add("dock", "v2"); builder.Add("duck", "v3"); std::cout << "-------------" << std::endl; leveldb::Slice result = builder.Finish(); for (char c : result.ToString()) { if (isalnum(c)) std::cout << c << ' '; else std::cout << "\\0x" << int(c) << ' '; } std::cout << std::endl; std::cout << "-------------" << std::endl; return 0; }
输出结果:
\0x0 \0x4 \0x2 d e c k v 1 \0x1 \0x3 \0x2 o c k v 2 \0x0 \0x4 \0x2 d u c k v 3 \0x0 \0x0 \0x0 \0x0 \0x17 \0x0 \0x0 \0x0 \0x2 \0x0 \0x0 \0x0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
sstable 一章中介绍“data block 结构”的例子中,第二个 restart point 的值应为 17 而不是 16。错误的图片如下:![](https://camo.githubusercontent.com/97f13ca92a0798a83f0c42b5b96fcdb046b828cf994151b48425de50991e181d/68747470733a2f2f6c6576656c64622d68616e64626f6f6b2e72656164746865646f63732e696f2f7a682f6c61746573742f5f696d616765732f64617461626c6f636b5f6578616d706c655f322e6a706567)
验证代码:
输出结果:
The text was updated successfully, but these errors were encountered: