Couldn't the input be automatically described/guessed using a few rows of data and a LLM?
It could be a problem that is well-suited to machine learning, as there is a clear objective function: Did compression succeed, and if so what is the compressed size.