fn compact_parts(pos: impl Iterator<Item = usize>) -> Vec<usize>
See dense_parts. pos are the (strictly increasing) positions in the long vector.
dense_parts
pos