15 #include "../config/config.hpp"
29 inline void write(std::ostream& os, T value)
31 os.write((
char*) &value,
sizeof(T));
35 inline T
read(std::istream& is)
38 is.read((
char*) &value,
sizeof(T));
45 const char *ptr =
reinterpret_cast<const char*
>(&val);
46 vec.insert(vec.end(), ptr, ptr +
sizeof(T));
49 void WriteBase64(std::ostream &
out,
const void *bytes,
size_t length);
void write(std::ostream &os, T value)
void WriteBase64(std::ostream &out, const void *bytes, size_t nbytes)
void AppendBytes(std::vector< char > &vec, const T &val)
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...