+
+ +----------+
+ | |
+ | OPEN |
+ | |
+ +----------+
+ |
+ |
+ | compr_set_params()
+ |
+ V
+ +----------+
+ compr_drain_notify() | |
+ +------------------------>| SETUP |
+ | | |
+ | +----------+
+ | |
+ | |
+ | | compr_write()
+ | |
+ | V
+ | +----------+
+ | | |
+ | | PREPARE |
+ | | |
+ | +----------+
+ | |
+ | |
+ | | compr_start()
+ | |
+ | V
+ +----------+ +----------+ compr_pause() +----------+
+ | | | |----------------------->| |
+ | DRAIN |<-------------------| RUNNING | | PAUSE |
+ | | | |<-----------------------| |
+ +----------+ +----------+ compr_resume() +----------+
+ | |
+ | |
+ | | compr_free()
+ | |
+ | V
+ | +----------+
+ | compr_free() | |
+ +------------------------>| |
+ | STOP |
+ | |
+ +----------+