Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost::iostreams] How to get number of byteswritten?
From: Eric MALENFANT (Eric.Malenfant_at_[hidden])
Date: 2008-11-28 08:45:49

eg, le 27 novembre 2008 14:49:
> Milan Svoboda wrote:
>> I'm using boost::iostreams and its filters to compress and
>> decompress data. However I'm not able to retrieve number of bytes
>> really written (number of bytes after a compression).
>> Does anybody know how to do that?
> Maybe I dont quite understand the problem...
> Could you just write a simple pass-through filter which counts the
> bytes only? Something like:
> io::filtering_ostream out;
> out.push(compressor());
> out.push(passthru()); // <- this just counts bytes
> out.push(file_sink("my_file.txt"));

...and if it is the case, good news: It already exists:

Éric Malenfant
A conclusion is the place where you got tired of thinking

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at