This article is likely no longer relevent, follow the instructions at your own risk!

For an API I am building, I needed to enable Gzip compression in IIS Express for JSON and came across GZip response on IIS Express.

There are just two commands to run. This example is for IIS Express but the same commands work in IIS:

appcmd set config -section:urlCompression /doDynamicCompression:true
appcmd set config /section:staticContent /+[fileExtension='.json',mimeType='application/json']
appcmd.exe set config -section:system.webServer/httpCompression /+"dynamicTypes.[mimeType='application/json',enabled='True']" /commit:apphost

Then, restart IIS or IIS Express afterwards. Gzip compression is very beneficial, and it lowered response sizes for JSON API requests dramatically, sometimes by greater than 50%.