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

crc_t crc_reflect ( crc_t  data,
size_t  data_len 
)

Reflect all bits of a data word of data_len bytes.

Parameters:
dataThe data word to be reflected.
data_lenThe width of data expressed in number of bits.
Returns:
The reflected data.

Definition at line 97 of file crc.c.

{
    unsigned int i;
    crc_t ret;

    ret = data & 0x01;
    for (i = 1; i < data_len; i++) {
        data >>= 1;
        ret = (ret << 1) | (data & 0x01);
    }
    return ret;
}

Generated by  Doxygen 1.6.0   Back to index