My only 7" ARs are in 223. My shortest 300 whisper is 10.5 with the gas port at the same position as a 7" pistol. No doubt you can move the gas port closer to the chamber and still use a reasonable length gas tube to prevent early bolt opening. The gas impulse from the gas port is at the average pressure from the time the bullet passes the gas port until it exits the muzzle. The energy available is the time x pressure product. gas port area is a multiplier. Sure a larger gas port helps, but 300 Whispers have about 1.9 times the bore volume and about 1/3 the propellant of a 223. The 300 Whisper propellent is (usually) much faster burning so the pressure drops very rapidly with bullet travel down the barrel. The slower bullet plugging the barel helps the time factor, but it's still won't be as much available energy at the port as a 223.
Ever look at a Desert Eagle gas system? Their gas port is about 1 mm in front of the case mouth. The gas still travels the length of the barrel (in a small tube parallel to the bore) to reach a gas piston near the muzzle.
If you're planning on suppressing and just want the overall length reduced you might consider this Finnish design where over half of the suppressors expansion volume wraps around the barrel instead of sticking out in front.