If you had control of both ends you could embed a header in the uncompressed data with the number of uncompressed bytes.
Not sure about you, but to me "XmlHttpRequest" in my request handling code feels less dirty than "x-amz-meta-". But to each their own I guess.
Check CloudFlare, Akamai, ...
Or we can keep using XmlHttpRequest.
Tough choice.