I've faced down an attacking dog in a similar circumstance. I also spent one summer training security dogs in attack and defense including wearing the big puffy suit. Key is to not be backing up and to move forward and to be aggressively giving the dogs commands such as Stop, Heal, etc.
Dogs will typically try to backup and circle you if you are being aggressive and keeping the dogs weight on its back feet is key.
For those who want to know if it is a truly aggressive dog it may just leap in on its first rush and attack. For a bigger dog you want interlock your arms in front you in a box shape
like this but with a stronger frame with your hands firmly in the crease of your arms.
And as the dog lunges up you use your elbows to hit and push him side to side past you.
For mid size dogs that will not jump that high you want to use Muay Thai type side ways knee shots again trying to take the dog mid air and hit it while pushing it to the side and past you.
There are very different tactics you use against a dog who is posturing to attack like in this OP versus one who is lunging and an attacking. the lunging dog you want to be like a Matador and direct its energy to the sides of you and have its momentum carry it past you. You want that space.
Posturing for an attack you want to be as Alpha as possible and try and back the dog down, make him reconsider his attack, which he will not do if you are trying to escape or cowering.