Logo Search packages:      
Sourcecode: acoustid-fingerprinter version File versions  Download package

crc_t crc_update ( crc_t  crc,
const unsigned char *  data,
size_t  data_len 

Update the crc value with new data.

crcThe current crc value.
dataPointer to a buffer of data_len bytes.
data_lenNumber of bytes in the data buffer.
The updated crc value.

Definition at line 119 of file crc.c.

References crc_table.

    unsigned int tbl_idx;

    while (data_len--) {
        tbl_idx = (crc ^ *data) & 0xff;
        crc = (crc_table[tbl_idx] ^ (crc >> 8)) & 0xffffffff;

    return crc & 0xffffffff;

Generated by  Doxygen 1.6.0   Back to index