One correction to what I said several posts back, the defenders have no need to blow the air out of the hangar bays. The bays's shields keep both enemy ships out and air in. You either need to kill the shields by blowing up the emitters, which will always blow the air out into space, resulting a vacuum in the hangar, or you need the frequency codes that allow you to modulate your boarding ships' shields, so they can pass right through the barrier. The barrier uses a rapidly changing frequency to avoid someone coming in without a security code to match hangar's shields. Air isn't able to escape through a properly working shield, since the shields are too strong. They act like a wall as far as air molecule are concerned.
The advantage of this approach is that I don't need two sets of shields: one to defend the hangars from outside attack, and another as an airlock between space and the hangar. My single set of shields serves both purposes.