diff options
Diffstat (limited to '.functions')
-rw-r--r-- | .functions | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -25,6 +25,14 @@ function server() { python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port" } +# Get gzipped file size +function gz() { + echo "orig size (bytes): " + cat "$1" | wc -c + echo "gzipped size (bytes): " + gzip -c "$1" | wc -c +} + # Test if HTTP compression (RFC 2616 + SDCH) is enabled for a given URL. # Send a fake UA string for sites that sniff it instead of using the Accept-Encoding header. (Looking at you, ajax.googleapis.com!) function httpcompression() { |