Lines Matching defs:crc
21 unsigned crctable[256], crc;
204 dd->crc = ~0;
329 dd->crc = ~0;
426 unsigned crc, *crc_table = dd->crctable;
428 crc = dd->crc;
429 for (i = 0; i<len; i++) crc = crc_table[(crc^data[i])&0xff] ^ (crc>>8);
430 dd->crc = crc;
435 // Start with crc = 1, or pass in last crc to append more data
436 unsigned adler32(char *buf, unsigned len, unsigned crc)
438 unsigned aa = crc&((1<<16)-1), bb = crc>>16;
461 // Little endian crc table
470 bitbuf_put(bb, ~dd->crc, 32);
487 // Little endian crc table
499 if (~dd->crc != bitbuf_get(bb, 32) || dd->len != bitbuf_get(bb, 32))
500 error_exit("bad crc");