/* Calculates a CRC8 checksum for the given buffer with the polynom stored in the crc_table  */
static guint8 crc8_precompiled(guint8 *buf, guint32 len, guint8 seed, const guint8 crc_table[])
/* Calculates a CRC8 checksum for the given buffer with the polynom stored in the crc_table  */
static guint8 crc8_precompiled(guint8 *buf, guint32 len, guint8 seed, const guint8 crc_table[])
{
    guint8 crc;
    crc = seed;
    while(len-- > 0)
        crc = crc_table[(guint8)(*buf++) ^ crc];
    return crc;
}