MCPcopy Create free account
hub / github.com/baidu/tera / WriteToStream

Function WriteToStream

src/admincli.cc:562–569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560}
561
562void WriteToStream(std::ofstream& ofs, const std::string& key, const std::string& value) {
563 uint32_t key_size = key.size();
564 uint32_t value_size = value.size();
565 ofs.write((char*)&key_size, sizeof(key_size));
566 ofs.write(key.data(), key_size);
567 ofs.write((char*)&value_size, sizeof(value_size));
568 ofs.write(value.data(), value_size);
569}
570
571void WriteTable(const TableMeta& meta, std::ofstream& ofs) {
572 std::string key, value;

Callers 3

WriteTableFunction · 0.85
WriteTabletFunction · 0.85
DumpMetaTableToFileMethod · 0.85

Calls 2

dataMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected