Boost logo

Boost Users :

Subject: Re: [Boost-users] Compress to buffer
From: Kenneth Adam Miller (kennethadammiller_at_[hidden])
Date: 2014-01-16 17:27:45


Ah ok. Well I didn't know, what I thought was, if the word size of the
machine was 8 bytes, then each clock cycle move would result in 8 bytes
being moved. I wasn't sure though that's why I asked. I know it's silly to
consider this level of optimization, but I question things extremely hard
lol. Thanks, the list of errors the compiler was giving was just
overwhelming.

On Thu, Jan 16, 2014 at 4:03 PM, Gavin Lambert <gavinl_at_[hidden]>wrote:

> On 16/01/2014 17:08, Quoth Kenneth Adam Miller:
>
> Also, supposing I go with something like vector<int64_t> or something,
>>
>
> Why would you? Unless you can guarantee that you're always going to get a
> multiple of 8 bytes after compression, that seems like asking for trouble.
>
>
> how do I create a device to make the filtering stream complete? I had:
>> fos->push(boost::iostreams::back_insert_device<string>(*x));
>> now I need to do:
>> fos->push(boost::iostreams::back_insert_device<vector<
>> int64_t>>(*x));
>> but it complains with "error: no matching function for call to"
>> construct it, and then says that it wants one of a ton of different
>> valid things, but it template expands all of them so it's a bunch of
>> text...
>>
>
> Your ostream is templated on char, therefore it produces chars. You can't
> just insert a char into a vector of int64s.
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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