[iostreams] compressing and decompressing in memory
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? Thanks, Brian
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...
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
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...
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
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
On Sun, Nov 7, 2010 at 5:21 AM, Roland Bock
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 _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Great. Thanks for the help Roland. Brian
participants (2)
-
Brian Budge
-
Roland Bock