Paul Giaccone wrote:
Jonathan Turkanis wrote:
Paul Giaccone wrote:
If this is not the right way to flush the stream, what should I be doing instead? I tried strict_sync() but this returned false because it looks as though the compressor is not flushable (although I could not find anything about this in the documentation).
Right, the compressors are not flushable. The purpose of strict_sync() is to allow you to switch filters in the middle of a sequence of i/o operations. With compression, switching filters before all the data is compressed will generally result in garbage, so there's no point trying to implement flush().
Thanks for the confirmation, Jonathan. The program I sent in my original posting is the exact program I am testing.
The stack trace you posted looks like it contains some code from Boost.Serialization.
It's strange though that reset() should crash for me but not for you.
Definitely. What compiler options are you using?
Paul Giaccone
-- Jonathan Turkanis www.kangaroologic.com