How to hook up Boost serialization & iostreams to serialize & gzip an object to string?
I've been using the Boost serialization library, which is actually pretty nice, and lets me make simple wrappers to save my serializable objects to strings, like so: namespace bar = boost::archive; namespace bio = boost::iostreams; template <class T> inline std::string saveString(const T & o) { std::ostringstream oss; bar::binary_oarchive oa(oss); oa << o; return oss.str(); } template <class T> inline void saveFile(const T & o, const char* fname) { std::ofstream ofs(fname, std::ios::out|std::ios::binary|std::ios::trunc); bar::binary_oarchive oa(ofs); oa << o; } template <class T> inline void