Gas powered compressors can run on gasoline or diesel and both have advantages and disadvantages.
The gasoline engines tend to serve the popular end of the market while the diesel versions are more typical of heavy industrial uses. Petrol engines are more easily adjustable to enable lower power output when that is required. They are cheaper to buy and generally lighter to schlepp around.
By comparison, diesel engines are bulkier, heavier, noisier and smellier beasts too, as anyone who had a diesel car will testify. But they can be more economical to operate and deliver more horse power. That’s probably why you’ve never heard of a petrol powered ship. They moved from steam power, through diesel straight to nuclear.
Of course the engine is completely separate from the eventual compressed air storage and supply system. Although connoisseurs swear that they can tell the difference between petrol generated air and that made with diesel.
Construction activities of one type or another are where gas powered tools and compressors are most commonly found but their use is far from restricted to building sites or road works. Anything that requires a steady supply of air to operate is a possible candidate for hooking up to a gas air compressor.
Scuba diver suppliers use them to charge the air tanks, silent versions are used in hospitals and laboratories for compressing gases and for delivering jets of air for cleaning. You are familiar with pumping your tyres at the gas station but maybe not with the oxidation process in petroleum production or what is needed for bagging cement.