adam-singer / dart-carte-du-jour

Pub documentation generation system
www.dartdocs.org
Other
25 stars 8 forks source link

gzip configuration on cloud storage #8

Closed adam-singer closed 10 years ago

adam-singer commented 10 years ago

gsutil help metadata

echo "Highly compressible text" | gzip > foo.txt
gsutil -h "Content-Encoding:gzip" -h "Content-Type:text/plain" \
   cp foo.txt gs://bucket/compressed

Add the Content-Encoding:gzip header. Open question, can this be applied to all uploaded objects?

adam-singer commented 10 years ago

Follow the guidelines from google https://developers.google.com/speed/docs/best-practices/payload#GzipCompression

adam-singer commented 10 years ago

Completed at 0676c4ed1ec8f3c0c2726a2f15879bf7ffb2ba99 this also triggers the cache-control Cache-Control:public, max-age=3600 to be set. A full rebuild of packages would be needed cause gzip is done at gsutil upload time.