I'm serving up most of my static media from a CDN for my website. This includes images, videos, javascript files, and CSS files. YSlow and Google's Performance tool tell me that I should be gzip'ing this content. How can I gzip content served up by a CDN? Is there a way to store the content zipped on the CDN?
Would gzip'ing content from a CDN improve page load times? I don't care about the CDN bandwidth, but would be interested if it could actually load the page faster for the end user.
It will have to depend on the CDN you are using. Some CDNs support on-the-fly gzip compression (same functionality that you would get from enabling gzip in Apache or nginx). Other CDNs do not support gzip (last time I checked, CloudFront did not for instance).
You could pre-gzip files but that's something you will have to try to see if your CDN properly supports it.
Keep in mind, the "faster" page load in this case is because of the reduction in data transfer. A slow browser/computer is still going to be slow regardless.
Lastly, you should not be gzipping images/videos. Those should already be compressed already due to the format and you would just be wasting CPU and bandwidth to compress them.