Boost logo

Boost Users :

Subject: Re: [Boost-users] [crc] bug in boost::crc
From: U.Mutlu (for-gmane_at_[hidden])
Date: 2015-07-09 17:55:58


Bjorn Reese wrote on 07/09/2015 11:45 PM:
> On 07/09/2015 07:27 PM, U.Mutlu wrote:
>
>> // test: doing the same as above, but now in 2 steps, ie. chunk- or
>> blockwise:
>> std::string sTxt;
>> uint32_t result = 0xFFFFFFFF;
>> for (size_t i = 0; i <= 1; ++i)
>> {
>> sTxt += !i ? "The quick brown fox "
>> : "jumps over the lazy dog";
>
> Bug 1: Do not append to the string.
>
>> // using the special ctor for initial remainder stored in "result"
>> boost::crc_optimal<32, 0x04C11DB7, 0xFFFFFFFF, 0xFFFFFFFF, true,
>> true> crc(result);
>
> Bug 2: Do not pass checksum() as the initial remainder, but rather
> get_interrim_remainder().

Thx, now it works.


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