def readLong(data, index):
	"""
	Read four bytes from the data and return an integer.
	"""

	# Note that the data is little-endian (Intel style), so the first byte
	# is the least significant

	return 16777216*ord(data[index+3]) + 65536*ord(data[index+2]) + 256*ord(data[index+1]) + ord(data[index])