Allow converting buffer_t types to std::strings and vice versa, useful for text files.