
Thank you eg, Chris, But I have probably misled you a bit with my post. The gzipped data is actually in memory (inside the storage variable), and I wanted to have a gzip_decompressing stream from that. for no I am using this patch Index: detail/adapter/direct_adapter.hpp =================================================================== --- detail/adapter/direct_adapter.hpp (revision 59992) +++ detail/adapter/direct_adapter.hpp (working copy) @@ -116,6 +116,7 @@ std::streamsize write(const char_type* s, std::streamsize n); std::streampos seek( stream_offset, BOOST_IOS::seekdir, BOOST_IOS::openmode = BOOST_IOS::in | BOOST_IOS::out ); + bool putback(const char_type c); void close(); void close(BOOST_IOS::openmode which); #ifndef BOOST_IOSTREAMS_NO_LOCALE @@ -204,6 +205,18 @@ } template<typename Direct> +inline bool direct_adapter<Direct>::putback + (const char_type c) +{ + pointers& get = ptrs_.first(); + if( get.ptr == get.beg ) + throw bad_putback(); + get.ptr -= 1; + *get.ptr = c; + return true; +} + +template<typename Direct> inline std::streamsize direct_adapter<Direct>::write (const char_type* s, std::streamsize n) { Nikolay Mladenov