Compaction Task vs Same Interval Merge Task

How are the two different?
Both seem to merge all segments of a given interval into on.