| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | CRC32 |
Hi All.
I've been playing with some CRC code and discovered some neat things.
normally when calculatig CRC-32 the register is seeded with -1 and after
processing the data, inverted
with a slightly different table those steps are unneccessary.
A regular CRC table can be translated into one that used with the same
algorithm produces the same result when seeded with 0 and not inverted.
Here's how.
void make_new_crctab (void)
{
int n;
for(n=0;n<256;n++) MagicCRC32tab[n]=CRC32tab[n^0xff]^0xff000000;
}
These same values can also be determined by taking the CRC32 of a buffer
containg a single byte equal to the table index :)
-=> Bye <=-
---
* Origin: As King Arthur said: Some days it all seems so feudal. (3:640/1042)SEEN-BY: 633/267 270 @PATH: 640/1042 531 954 774/605 123/500 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.