After you enable the Gzip compression feature, Alibaba Cloud CDN points of presence (POPs) use Gzip compression to compress resources before the resources are returned to clients. The Gzip compression feature reduces file sizes, accelerates file distribution, and reduces bandwidth consumption.
Background information
Gzip compression compresses source files that are between 1 KB and 10 MB. Files outside this size range are not compressed.
The Gzip compression feature supports the following formats: text/xml, text/plain, text/css, application/javascript, application/x-javascript, application/rss+xml, text/javascript, image/tiff, image/svg+xml, application/json, and application/xml.
If a request carries the
Accept-Encoding: gziprequest header, the client wants to use Gzip compression to compress the requested resources.If a response from the origin server carries the
Content-Encoding: gzipresponse header, the resources returned to the client are Gzip-compressed.
Notes
ApsaraVideo VOD changes the MD5 hash of static files during compression. If your source files use MD5 validation, disable the Gzip compression feature.
The ApsaraVideo VOD compression feature is not applied if compression is enabled on the origin server and the server response includes the
Content-Encodingresponse header.Common image file types, such as PNG, JPG, and JPEG, and video file types, such as MP4, AVI, and WMV, are already compressed. Gzip compression provides no additional benefit for these files. To further reduce the size of image files, use the Image processing feature. To further reduce the size of video files, use the Transcoding feature.
Procedure
Log on to the ApsaraVideo VOD console.
In the left-side navigation pane, choose Configuration Management > CDN Configuration > Domain Names.
Find the target domain name, click Configure.
In the navigation pane on the left, click Performance Optimization.
In the Gzip Compression section, turn on Gzip Compression.
You can compare the format of a file before and after the Gzip compression feature is enabled. If the file name extension is .gzip, the file is compressed.

Reference
BatchSetVodDomainConfigs: Configures one or more domain names.