def crc_update(crc, data):

  if type(data) != array.array or data.itemsize != 1:
    buf = array.array("B", data)
  else:
    buf = data

  crc = crc ^ _MASK
  for b in buf:
    table_index = (crc ^ b) & 0xff
    crc = (CRC_TABLE[table_index] ^ (crc >> 8)) & _MASK
  return crc ^ _MASK
:param list targets: list of targets to calculate test classes for.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/files/crc32c.py/crc_update--crossover with--dataset/ETHPy150Open pantsbuild/pants/src/python/pants/backend/jvm/tasks/junit_run.py/JUnitRun._calculate_tests_from_targets