[iostreams][serialization] compressed UTF-8 XML archive

(Was: Re: [Boost-users] Filesystem, serialization, character encoding and portable software) On 14 August 2008 00:44, Robert Ramey <ramey@rrsd.com> wrote:
I understand that to get a UTF-8 XML file, I need to use a wide-character stream, but I can't seem to understand how I can compress a serialized UTF-8 xml archive... it seems I can either do: namespace bio = boost::iostreams; namespace fs = boost::filesystem; fs::wofstream ofs(path,ios::binary); bio::filtering_stream<bio::output,wchar_t> out; out.push(bio::gzip_compressor()); // PROBLEM: gzip_compressor only accepts char out.push(ofs); boost::archive::xml_woarchive oa(out); --- OR --- fs::ofstream ofs(path,ios::binary); bio::filtering_stream<bio::output> out; out.push(bio::gzip_compressor()); out.push(ofs); boost::archive::xml_woarchive oa(out); // PROBLEM: only accepts wostream I've googled but haven't found anything relevant... either people use an ifstream with gzip_compressor, or they don't use gzip_compressor at all. thanks, Paul

AMDG michelle Tchicaya wrote:
There's a categorized list of libraries at http://www.boost.org/libs/libraries.htm If you want to know about a specific library, most have tutorials in their documentation. If you need any help, feel free to ask here. In Christ, Steven Watanabe P.S. Please don't reply to an existing thread with a new subject.
participants (3)
-
michelle Tchicaya
-
Paul
-
Steven Watanabe