def byteArrayToInt(packed_data):
 value = struct.unpack('B B B B B B B B', packed_data)
 return ((((((((value[0] << 56) | (value[1] << 48)) | (value[2] << 40)) | (value[3] << 32)) | (value[4] << 24)) | (value[5] << 16)) | (value[6] << 8)) | value[7])

def byteArrayToInt ( packed_data ) : value = struct . unpack ( 'B B B B B B B B' , packed_data ) return ( ( ( ( ( ( ( ( value [ 0 ] << 56 ) | ( value [ 1 ] << 48 ) ) | ( value [ 2 ] << 40 ) ) | ( value [ 3 ] << 32 ) ) | ( value [ 4 ] << 24 ) ) | ( value [ 5 ] << 16 ) ) | ( value [ 6 ] << 8 ) ) | value [ 7 ] )
converts a byte array into an integer .