12size_t read_size(
const std::string &src,
size_t &off)
noexcept
22 in.read(
reinterpret_cast<char*
>(&last_hash),
sizeof last_hash);
23 const std::string src{std::istreambuf_iterator<char>{in}, {}};
24 return {src, last_hash, std::hash<std::string>{}(src) == last_hash};
29 size_t n = std::hash<std::string>{}(s);
30 out.write(
reinterpret_cast<char*
>(&n),
sizeof n) <<s;
THE common namespace of bux library.
std::tuple< std::string, size_t, bool > load_hashed_str(std::istream &in)
void read(const std::string &src, size_t &off, T &data) noexcept
size_t read_size(const std::string &src, size_t &off) noexcept
size_t save_hashed_str(std::ostream &out, const std::string &s)