The defragmentation process is almost completely stateless (apart from the location it is working on), which means it can be stopped and started instantly.
Since disks based on flash memory have no moving parts, random access of a fragment does not suffer this delay, making defragmentation to optimize access speed unnecessary.
Note that in modern parlance, this kind of operation might be called defragmentation or garbage collection; data compression nowadays refers to a different, more complicated concept.
The defragmentation process is almost completely stateless (apart from the location it is working on), so that it can be stopped and started instantly.