public static long compute(ByteBuffer buffer, int offset, int size) {
        Checksum crc = create();
        Checksums.update(crc, buffer, offset, size);
        return crc.getValue();
    }
Compute the CRC32C (Castagnoli) of a byte buffer from a given offset (relative to the buffer's current position)

@param buffer The buffer with the underlying data
@param offset The offset relative to the current position
@param size The number of bytes beginning from the offset to include
@return The CRC32C
clients/src/main/java/org/apache/kafka/common/utils/Crc32C.java