update sort_utils, add segmented sort
got edge flags/keys/offsets