2
votes

I have a series of uncompressed (binary/Octet-stream) files on Google Cloud storage. I'm trying to download them using gzip. According to this page

https://developers.google.com/storage/docs/json_api/v1/how-tos/performance

I can add

Accept-Encoding: gzip User-Agent: my program (gzip)

and download the files compressed. This does not work for me. Am I missing something? The files always come back uncompressed. Anyone else experience the same issue?

1

1 Answers

1
votes

You can add that header to indicate that you're willing to receive gzipped content, but the HTTP spec says that there is no guarantee. In case of Google Cloud Storage, unless the object was already uploaded with gzip content-encoding, the response will not have gzipped content (i.e. GCS does not dynamically compress objects).

(The linked docs page could probably be more clear about this, I'll suggest to clarify this issue.)