[comp.lang.c] CRC-16 or CRC-32

darren@revcan.UUCP (Darren Morbey) (03/22/91)

Can anyone provide source code for calculating CRC-16 or CRC-32 for a
given buffer of memory?  I would appreciate using a calculation rather
than a lookup table.  Thanks.    Darren Morby.

glenm@bnr.ca (Glen Martin) (03/22/91)

CRC-16 code in C is available in "the C programmers guide to
serial communications" or some similar title, by Scott
Campbell (I think). It's a big blue book that I haven't
looked at for a while, and it's at home 8-).  If you can't locate
the book, call me, or mail me AT HOME gdm@sandelman.OCunix.on.ca.

CRC-32 code is purportedly available in a book on NETBIOS published
by Microsoft Press, Once again, a fairly common book that any
decent computer bookstore should have.
 
-------------------------------------------------------------------------------
Glen Martin  |Bitnet:  glenm@bnr.ca                   |  Phone: (613) 763-7299
BNR Ltd.     |  UUCP:  ..uunet!bnrgate!bcars318!glenm |  FAX:   (613) 763-2626
           BNR may own my fingers, but my opinions are all mine.
-------------------------------------------------------------------------------