On 11/05/2010 09:30 PM, Brian Budge wrote:
HI Roland -
Thanks for the link. Is this safe and/or efficient to use for binary data "file"s?
Thanks, Brian
On Fri, Nov 5, 2010 at 11:36 AM, Roland Bock
wrote: On 11/05/2010 03:06 PM, Brian Budge wrote:
I've been searching around for examples for how to compress and decompress using the zip or gzip iostreams compressors into/out of memory buffers. Has anyone tried this? Would you use basic_array for this?
I used std::string, like this, for example:
https://svn.boost.org/trac/boost/attachment/ticket/2411/istream_bzip2_succes...
Please don't top-post. I used this pattern for about 2 years with many millions of documents. Strings were stored in and read from files. No data loss ever. Efficiency is basically the same as the respective compression algorithm. I used gzip, which seemed the best compromise between speed and compression rate in my scenario. Regards, Roland