Yes, using gzip_compressor(zl_params, 10485760) , doesn't increase the buffer size. I tried few things , and it worked now. Modified code: Code snippet ------------------ std::ofstream ofs(outPath.c_str() , std::ios::out|std::ios::binary|std::ios::trunc); { boost::iostreams::filtering_streambuf out; out.push(boost::iostreams::gzip_compressor(); out.push(); { boost::archive::binary_oarchive oa(out); oa << data; } } Without enclosing code in braces, it takes time with 100% cpu. After enclosing in braces, it seems to be very fast. No idea how enclosing in braces increases the speed. Any suggestion ? After solving this issue, I came across with another issue. I had written decompresser with gzip, standalone utility works fine, but when I embed same code in my multi-threaded application, filestream stuck in waiting for lock(scoped_lock). Please suggest. If you want I can post the gdb stack trace. -- View this message in context: http://boost.2283326.n4.nabble.com/Increase-iostream-zlib-filter-buffer-size... Sent from the Boost - Users mailing list archive at Nabble.com.