|
Boost Users : |
Subject: Re: [Boost-users] [iostreams] compressing and decompressing in memory
From: Brian Budge (brian.budge_at_[hidden])
Date: 2010-11-07 08:47:52
On Sun, Nov 7, 2010 at 5:21 AM, Roland Bock <rbock_at_[hidden]> wrote:
> 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<rbock_at_[hidden]> 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_success.cpp
>>>
>>
> 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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Great. Thanks for the help Roland.
Brian
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net