Running the compression algorithms is O(kn) where k is the number of compression algorithms. Taking the machine learning approach is O(n).
That said, I was really more interested in practical runtimes. Like, in practice the ML may have a high startup cost (e.g., due to cost of loading a model), whereas for most sized datasets linear complexity may be fine...