This code can most likely be placed anywhere in the .htaccess file. I like to put it below the Rewrite conditions and above the Expires for organizational purposes. Note that the If statements are really only needed if you are unsure that your host has it enabled or not.
If your hosting setup has Gzip enabled I highly recommend that you enable it in your .htaccess file by copying and pasting the above code into your .htaccess. If they don't have it enabled, simply ask, most of the time they will simply enable it for you. It also comes recommended by Google and Yahoo.