When using HTTP, GCS decompresses gzip-encoded objects by default:
https://cloud.google.com/storage/docs/transcoding
``` Setting this option to `gzip` disables automatic decompression. This can be useful for applications wanting to operate with the compressed data. Setting this option to `identity`, or not setting this option, returns decompressed data.
<aside class="note"><b>Note:</b>
Note that decompressive transcoding only apply to objects that are compressed with `gzip` and have their `content_encoding()` attribute set accordingly. At the time of this writing GCS does not decompress objects stored with other compression algorithms, nor does it detect the object compression based on the object name or its contents.
</aside>
###### See Also
[`AcceptEncodingGzip()`](xref:namespacegoogle_1_1cloud_1_1storage_1abb76cc18ed021b748ead4a4845b9b81e) is a helper function to disable decompressive encoding.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-01 UTC."],[[["This page lists different versions of the `AcceptEncoding` structure within the Google Cloud Storage C++ client library, ranging from version 2.11.0 to the latest release candidate, 2.37.0-rc."],["The `AcceptEncoding` structure controls how the client handles content encoding, specifically related to HTTP and GCS decompression of gzip-encoded objects."],["By default, GCS decompresses gzip-encoded objects via HTTP, however, setting `AcceptEncoding` to `gzip` disables this automatic decompression, which is helpful when working with the compressed data directly."],["Decompressive transcoding is only applied to objects compressed with gzip and having the `content_encoding()` attribute properly set; GCS does not decompress objects compressed using other algorithms, nor will it detect the compression based on the object name or contents."],["The `AcceptEncodingGzip()` function can be used to quickly disable decompressive encoding, and the `header_name()` function provides the name of the header."]]],[]]