Compression algorithm

Overview

This feature provides multiple compression algorithms (Brotli, Gzip, Deflate, ZSTD) to intelligently compress static resources on websites, effectively reducing the amount of transmitted data and improving loading speed. Support sorting by priority, independent activation/deactivation, and optimization control based on file type and size. This feature can significantly reduce bandwidth consumption, improve webpage loading performance, while maintaining compatibility and flexibility.
Note that all content that can be optimized must be able to be cached. If your resources are retrieved from the source, the functionality will be disabled.

Supported compression algorithms

Brotli(Recommanded)

  • The compression ratio is better than Gzip, especially suitable for text resources (HTML/CSS/JS).
  • Client support is required (compatible with modern browsers).

Gzip(Wide compatibility)

  • Strong universality, suitable for all mainstream browsers and servers.
  • The compression ratio is slightly lower than Brotli, but the processing speed is faster.

Deflate(Lightweight)

  • Based on Zlib, suitable for low performance devices or old version environments.
  • The compression ratio is similar to Gzip, but the computational cost is lower.

ZSTD(high-performance)

  • Provide a compression rate close to Brotli while having faster decompression speed.
  • Suitable for large files such as JSON and XML.

Configure rules

  • File size range
    1KB ~ 32MB(Not compressed beyond the range).

  • Supported MIME types
    text/*application/javascriptapplication/jsonapplication/atom+xmlapplication/rss+xmlapplication/xhtml+xmlimage/svg+xml

  • Supported extensions
    .js.json.html.htm.xml.css.woff2.txt

  • Unsupported extension
    .apk.ipa(Binary files are not suitable for compression)

How to use compression algorithms

You can go to Resource Details → Optimizer → Compression Algorithm. After enabling it, you can drag and drop the algorithm to confirm the compression priority.

Usage suggestion (recommendation priority)

Brotli > ZSTD > Gzip > Deflate

Image compression

Overview

This feature automatically converts supported image formats (PNG/JPEG/BMP/ICO) into efficient WebP format, significantly reducing image size (usually by 25% -35%) while maintaining similar visual quality, effectively improving page loading speed and saving bandwidth.

Configuration rules

-File extension: png.jpeg.jpg.bmp.ico
-MIME type:image/pngimage/jpegimage/bmpimage/x-ico
-Image size limit: Width and height are both ≤ 16383px -File size limit: ≤ 10MB
-Default cache time: ≥ 7200 seconds (2 hours)

How to use Webp

You can go to Resource Details → Optimizer → Content compression → Image Algorithm and enable it without any additional configuration.

LightCDN all right reserved,powered by GitbookUpdated Time: 2025-04-22 15:14:54

results matching ""

    No results matching ""