Shrinks data with an optional predicate.