How to use compression option for ssh with the ProxyCommand?

Command 1 will compress data between the client and gateway, but not between the gateway and target. Option 2 will compress data between the client and target (at the expense of not compressing some protocol level data, which won't be significant). Option 3 will compress data between the client and target, and double compress data between the client and gateway (which you definitely don't want).

If the bandwidth between the gateway and target is high (e.g. LAN speed) then go with option 1. If not, go with option 2.