Most air compressors of the second half of the 19th century were powered by steam engines:
"...Both New York City based companies developed new and larger compressor models, expanding rapidly and becoming the two most prominent manufacturers of air compressors. Almost all of the air compressors in this period were driven by steam engines...."
(
https://www.compressortech2.com/new...-evolution-of-air-compressors/8040160.article)
Or do you mean you want to compress air by using the plumbing of a steam engine being driven by an external mechanism?