Adapted from gist.github.com/guyboltonking/2152663
Taken from: github.com/mattolson/heroku_rails_deflate