def _read_3(fid):
 data = np.fromfile(fid, dtype=np.uint8, count=3).astype(np.int32)
 out = ((np.left_shift(data[0], 16) + np.left_shift(data[1], 8)) + data[2])
 return out

def _read_3 ( fid ) : data = np . fromfile ( fid , dtype = np . uint8 , count = 3 ) . astype ( np . int32 ) out = ( ( np . left_shift ( data [ 0 ] , 16 ) + np . left_shift ( data [ 1 ] , 8 ) ) + data [ 2 ] ) return out
read 3 byte integer from file .