// Initialize CRC table for (int n = 0; n < 256; n++) { int c = n; for (int k = 0; k < 8; k++) { if ((c & 1) == 1) { c = 0xedb88320 ^ (c >>> 1); } else { c >>>= 1; } crcTable[n] = c; } }
return crc ^ 0xffffffff;
crc = 0xffffffff;
for (int n = 0; n < len; n++) { crc = crcTable[(crc ^ data[off + n]) & 0xff] ^ (crc >>> 8); }
crc = crcTable[(crc ^ data) & 0xff] ^ (crc >>> 8);