|
Rockbox mail archiveSubject: Re: CRC == 0 (was hcl: tools songdb.pl,1.39,1.40)Re: CRC == 0 (was hcl: tools songdb.pl,1.39,1.40)
From: Jerry Van Baren <gerald.vanbaren_at_smiths-aerospace.com>
Date: Tue, 06 Sep 2005 13:09:03 -0400 Daniel Stenberg wrote: > On Sat, 3 Sep 2005, Michiel van der Kolk wrote: > >> I don't know whether a CRC can become 0 or not, but i do know that the >> rundb code treats an CRC 0 as a special case in which there is no CRC >> known for the file, where it accepts an CRC 1 as a valid crc, this was >> the reason for the change. > > > I honestly can't see how the CRC value cannot become 0 for a valid CRC. I suspect the original statement on zero values is confusion based on a common requirement to initialize the CRC accumulator with a non-zero value. <http://www.repairfaq.org/filipg/LINK/F_crc_v34.html#CRCV_003> The "blind spot" is because the CRC is based on XOR operations and 0^0=0 so, if the CRC accumulator is initialized to zero and the incoming data starts with zeros, the accumulator will remain zero as long as the incoming data is zero. A consequence of this is that the CRC will not detect dropped bits or erroneously added '0' bits in the leading string of zeros (but will detect inverted bits and inserted '1' bits). gvb _______________________________________________ http://cool.haxx.se/mailman/listinfo/rockbox Received on 2005-09-06 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |