import binascii


def computeCRC(file, offset):
	"""
	Computes the CRC32 for the file, starting at given offset.
	"""
	f = open(file, "rb")
	f.seek(offset)
	crc = 0

	# Compute a running CRC32 for the file in 16kb chunks
	while True:
		buffer = f.read(16384)
		if not buffer: break		# End of file

		crc = binascii.crc32(buffer, crc)

	f.close()
	return crc