>>5841
A .22LR rifle maybe, if your shot placement is good. A .22 pistol will kill your target eventually, if you poke enough holes in them, but you stand basically no chance of actually incapacitating an attacker with it. We're talking potentially multiple hits to the sternum, eyes or throat. If your target does the gentlemanly thing and holds still while you get off a few shots it'll work fine. Not so much for any sort of real self defense.
That said, if you have no other option at all, a .22 pistol is better than no gun just because you usually don't have to pull the trigger to ward off an attacker. Just drawing the gun is often enough to make a bad guy change his mind, and shooting him in the back is frowned upon legally speaking. Even if he doesn't, a totally non-lethal hit might still make him go FIBS (Fuck I've Been Shot) and start flopping around on the floor like you blasted him with a .44.
But unless you're talking about hiding a NAA mini revolver in your swim trunks, you've got enough room to take a real gun.