Its a 240v circuit. The OP would need to use a DOUBLE POLE switch, so as to interrupt both sides of the 240v circuit. Thus two hot wires and a ground into the gang box, and two hots and a ground out of the gang box to the receptacle the compressor is plugged into. The switch would need to be amp rated high enough for the circuit in question, and HORSEPOWER rated for the actual horsepower of the motor (not the pesudo HP the manufacturer may have labeled the compressor with).
A Leviton double pole switch such as the 1222 series would be a double pole 20amp rated switch with (at 240v) a 2 hp motor rating, 16 amps max for a motor. I think Hubbell uses the same numbering system.
A Leviton double pole switch such as the 3032 series would be a double pole 30 amp rated switch, with (at 240v) a 2 hp motor rating but with a 24 amp max for the motor.
Leviton and Hubbell switches (and possibly other brands) are readily identified by amperage, using their color. Blue is 15 amp, red is 20 amp and green is 30 amp.
Problem is the OP says the compressor has a 240v plug with ONE blade sideways. This is a 20 amp 240v plug, otherwise identified as a NEMA 6-20 configuration, and a NEMA 6-20 receptacle SHOULD NOT be used on a 15 amp circuit.
Question to the OP? is the circuit wired with 12 gauge wire, or 14 gauge wire? If the circuit is wired ENTIRELY WITH 12 gauge wire, and has the NEMA 6-20 receptacle, you would do well to replace the circuit breaker with a 20 amp breaker to match the rest of the components in the circuit. If 14 gauge wire were used, you need to remove the NEMA 6-20 receptacle and use a 6-15 receptacle which has both blades crossways.
NEMA 6-15 receptacle
Issue with this is the compressor would not plug into it, but that becomes the point of having correct components in a circuit.
Having a proper HP rating switch is also important. Many times that info is either marked on the box, or on the strap of the switch, or found in the manufacturers literature for the component.
I doubt you could overfill the gang box with two hots in and out, but one does need to consider box fill as there may be many other circuits in the box also.
Charles