filtering_streambuf: Compressing a character buffer
I have a character buffer ( "buffer" ) of known size ( "size_in_bytes" ), and would like to compress it using gzip_compressor and then get a pointer to the compressed buffer along with the compressed size.
I've put together the following, but it says the first counter is 0 and the second counter is 2.
io::close(out); // Needed for flushing the data from compressor
std::ostream output(&out); // Maybe I can use rdbuf() to get the pointer to the stream?