Re: JFFS3 & performance

Artem B. Bityuckiy
2004-12-21T14:45:38Z

Hi,

> Principle of crc:
> A crc is nothing but the remainder of an integer division. That
> simple.
>
>
> Example crc4:
> crc4(data) = data%13;
Hmm, is it really correct? CRC is ramainder, but in mod 2 arithmetic. I
consulted http://www.cs.waikato.ac.nz/~312/crc.txt

And if so, your algorithm
u32 crc24(void *m, size_t len)
{
u32 ret=0;
char *s=m;
size_t i;
for (i=0; i<len; i++) {
ret <<= 8;
ret += s[i];
ret %/ 0xfffffd
}
return ret;
}

doesn't look like something which is called CRC...

Do I misunderstand something?

--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.