Boost logo

Boost Users :

Subject: Re: [Boost-users] [iostreams] Flushing a zlib_compressor... how to obtain a “zlib sync flush” ?
From: eg (egoots_at_[hidden])
Date: 2010-03-19 00:00:38


On 3/18/2010 5:31 AM, Tim Day wrote:
> Is there some magic required to obtain a "zlib sync flush" when using
> boost::iostreams::zlib_compressor ? Just invoking flush on the filter,
> or strict_sync on a filtering_ostream 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; I remember using such a feature when driving zlib
> directly in the past, and there's a page
> http://www.bolet.org/~pornin/deflate-flush.html
> describing it nicely).
>
> Looking at the header, there seem to be some "flush codes" defined
> (notably a sync_flush) but it's unclear to me how they should be used
> (bearing in mind my compressor is just added into a filtering_ostream's
> chain, although I do have a reference to it if some specific method
> needs invoking).
>

This is currently a feature request. In the ticket comments, the library
author refers to a mailing list thread wherein he does reply with how
the library works now:

See https://svn.boost.org/trac/boost/ticket/1656


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net