Boost logo

Boost Users :

From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2008-04-21 13:16:44


You can set at least (to basic_file_source
http://www.boost.org/doc/libs/1_35_0/libs/iostreams/doc/classes/file.html#file_source)
that it should be opened in the binary mode.

I think you can pass any of the flags defined in std::ios_base::openmode. If
that does not work, try to unset skipws flag, which skips all white spaces
when reading stream, but that actually should not apply to binary stream at
all.

Best Regards,
Ovanes.

On Mon, Apr 21, 2008 at 2:29 PM, Robert Bielik <robert.bielik_at_[hidden]>
wrote:

> Hi all,
>
> I'm trying to make filter to obfuscate some data so its not that obvious
> what it is. Problem is (I think) that in
> some cases, the obfuscator produces a null character as its output, and
> I'm not sure, but it seems that upon reading
> back the data, the null character is interpreted as EOF. At least, that is
> what I get from boost::iostreams::get(src) at
> the position where the null character was in the output. Can I somehow
> tell the stream that it is binary and not
> care about null characters?
>
> TIA
> /Rob
> _______________________________________________
> 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