A gas and an electric air compressor have their own advantages over each other. Gas-powered machines are the only option when operating in a place where there are no power lines, such as in a building in the starting stages of its construction. They also eliminate the need for power cords that could possibly trip the workers.
One of the downside, however, of the gas-operated equipment is that it cannot be operated in enclosed areas as the fumes from its exhaust pipe emit a foul odor, and a continuous exposure to it causes damage to the lungs. Further, this type is also quite noisy, giving off a loud rumble that could also potentially damage the ears.
For home and shop use, therefore, an electric air compressor is deemed a better option. It is quiet and does not foul up the air. There are both portable and stationery machines of this type, so that both home and commercial or industrial users can avail of it. There is also the choice of the oil-less type machines. As a rule, these do not last as long as the ones that require oil for their operation. However, maintaining them is far easier as they do not need frequent oil changes.
There is no shortage of models to choose from. Indeed, you may even be bewildered with all the types of air compressors available with variations from different engine power, tank capacities, PSIs, and CFMs. You may have to consult with your hardware store or with others who have experience with the machines.