home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!rsoft!mindlink!a7657
- From: a7657@mindlink.bc.ca (Stephen H. Kawamoto)
- Subject: CRC-32 C code needed
- Organization: MIND LINK! - British Columbia, Canada
- Date: Thu, 19 Nov 1992 04:40:37 GMT
- Message-ID: <17583@mindlink.bc.ca>
- Sender: news@deep.rsoft.bc.ca (Usenet)
- Lines: 27
-
- I'm trying to make my CRC-32 C program work but
-
- for ( c = i << 24, j = 8; j > 0; --j)
- ========
- this loses bits
-
- and when the table is built,
-
-
- crc = (crc << 8 ) ^ crc_table[(crc >> 24) ^ *p];
- =========
- this loses significent
- bits
-
-
-
-
-
- is there a better way to do this?
-
- --
- Stephen Kawamoto <a7657@mindlink.bc.ca>
- "It is the very mind itself
- That leads the mind astray;
- Of the mind,
- Do not be mindless."
- (an old Japanese folk song)
-