| 560 | } |
| 561 | |
| 562 | void 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 | |
| 571 | void WriteTable(const TableMeta& meta, std::ofstream& ofs) { |
| 572 | std::string key, value; |
no test coverage detected