Same mass, I mean, not volume. As a result, gasoline and compressed hydrogen will deliver about the same energy per volume.
Jumping in, there is one unmentioned factor.
Producing hydrogen with solar panels has a greater appeal and potential payoff in Belgium than say Texas. Belgium does in fact have sunlight but no oil or natural gas.