Skip to content

Instantly share code, notes, and snippets.

@othree
Created November 2, 2011 08:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save othree/1333179 to your computer and use it in GitHub Desktop.
Save othree/1333179 to your computer and use it in GitHub Desktop.
Check Compression
function check_compression {
local unzipped=`curl "$1" --silent --write-out "%{size_download}" --output /dev/null`
local zipped=`curl -H "Accept-Encoding: gzip,deflate" "$1" --silent --write-out "%{size_download}" --output /dev/null`
echo "unzipped size: $unzipped, zipped size: $zipped"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment