Subject: Re: New RelCache snapshot available
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-userlevel
Date: 12/11/2002 09:24:10
On Wed, Dec 11, 2002 at 11:36:15AM +0900, Bang Jun-Young wrote:
> On Wed, Dec 11, 2002 at 01:16:41AM +0900, Bang Jun-Young wrote:
> > - MD5 checksum has been replaced with 64-bit CRC32+Adler32. (Note: Adler32
> >   is known to have problem with very small data (how small is 'very small'
> >   data?), but it's not a problem in this case. Almost all ELF binaries are
> >   at least 1KB long anyway. I don't think 1KB is very small) 
> 
> Joel Wilsson told me that data less than 10KB can be considered "small"
> and 1KB data "very small". I can always replace Adler32 with Fletcher32,
> but have no source code for it.

IIRC the fletcher checksum is the one used by ISO transport,
in which case it is (two bytes) generated by:
	l += *p++; h += l;
with some magic done so that when the calculated sum is inserted
in the header then buffer checksums to zero.  For a hash you
want the raw sum...

The fletcher sum has the slight advantage over the Alder one
(as used by IP) in that the position of the words in the buffer
matters.

	David

-- 
David Laight: david@l8s.co.uk