title: Flushing a boost::iostreams::zlib_compressor. How to obtain a "sync flush"?
body: <p>Is there some magic required to obtain a <a href="http://www.bolet.org/~pornin/deflate-flush.html" rel="noreferrer">"zlib sync flush"</a> when using <a href="http://www.boost.org/doc/libs/1_41_0/libs/iostreams/doc/classes/zlib.html" rel="noreferrer"><code>boost::iostreams::zlib_compressor</code></a> ?  Just invoking <code>flush</code> on the filter, or <code>strict_sync</code> on a <code>filtering_ostream</code> containing it doesn't see to do the job (ie I want the compressor to flush enough that the decompressor can recover all the bytes consumed by the compressor so far, without closing the stream).</p>
  
  <p>Looking at the <a href="http://www.boost.org/doc/libs/1_41_0/boost/iostreams/filter/zlib.hpp" rel="noreferrer">header</a>, there seem to be some "flush codes" defined (notably a <code>sync_flush</code>) but it's unclear to me how they should be used (bearing in mind my compressor is just added into a <code>filtering_ostream</code>).  </p>