[iostreams] Is it possible to use gzip compression with wide char

Hi, I am new to boost::iostream and trying to make a simple example of iostream filtering with gzip compression for wide char, see example below. It seems there is no support in the gzip wrapper for wide char. How can I make it reading from a wide char stream ? Regards Bo #include <iostream> #include <ostream> #include <sstream> #include <boost/iostreams/device/file.hpp> #include <boost/iostreams/stream.hpp> #include <boost/iostreams/filtering_stream.hpp> #include <boost/iostreams/device/file_descriptor.hpp> #include <boost/iostreams/filter/gzip.hpp> #include <boost/config/warning_disable.hpp> #include <fstream> int main() { using namespace std; namespace io = boost::iostreams; { io::filtering_wostream out; //out.push(boost::iostreams::gzip_compressor()); // Error out.push(boost::iostreams::wfile_sink("text.gz")); out << 123 << endl; wcout <<"Done writing" << endl; } { io::filtering_wistream in; //in.push(boost::iostreams::gzip_decompressor()); // Error in.push(boost::iostreams::wfile_source("text.gz")); wcout << in.rdbuf() << endl; wcout <<"Done reading"<< endl; } }

On 21 March 2010 15:18, Bo Jensen <jensen.bo@gmail.com> wrote:
Hi,
I am new to boost::iostream and trying to make a simple example of iostream filtering with gzip compression for wide char, see example below. It seems there is no support in the gzip wrapper for wide char. How can I make it reading from a wide char stream ?
I'd just like to say "me too". I want to compress xml_woarchive files, which MUST be connected to a wide character string in order to generate UTF-8 output.
participants (2)
-
Bo Jensen
-
Paul