crc32 algorithm. obtained from dr dobb's journal