• Home
Home
Anti-DDoS CDNStatic & dynamic acceleration, edge scrubbingAnti-DDoS IP forwardingL4 forwarding with protected IPsSDK game shieldClient SDK for gaming workloadsAnti-DDoS serversDedicated compute with high availabilityLearn more
Gaming solutionLow latency + protectionFinancial solutionCompliance & scrubbingLive streaming solutionPush/pull at the edgeBlockchain solutionWeb3 infra protectionExplore
DocumentationAPIs & onboardingHelp centerFAQs & ticketsBlog & newsUpdates & best practicesGlobal speed testMulti-region performance checksTag cloudTopic map across the siteOpen docs
AboutMission & visionCareersHiringPartnersEcosystemContactSales & supportContact us

Documentation

  • Introduction
  • Best Practices
Docs/Performance Optimization/Smart Compression

Smart Compression

速盾网络 Team
Docs

Tags

  • 性能优化

On this page

No outline

Share

𝕏fin

Enterprise CDN & acceleration with AI-driven monitoring and full-spectrum, real-time DDoS/CC protection. Trusted by tens of thousands of companies for fast, secure, and reliable content delivery and DDoS mitigation.

Product

  • Anti-DDoS CDN
  • Anti-DDoS IP forwarding
  • SDK game shield
  • Anti-DDoS servers

Solutions

  • Gaming solution
  • Financial solution
  • Live streaming solution
  • Blockchain solution

Resources

  • Documentation
  • Help center
  • Blog & news
  • Global speed test

Company

  • About
  • Careers
  • Partners
  • Contact

© 2026-2028 sudun.com 保留所有权利

  • Privacy
  • Terms
  • Cookies

Sudun automatically compresses content to reduce bandwidth and improve load times. Support for Gzip and Brotli compression with intelligent content-type detection.

Supported Compression

AlgorithmCompression RatioBrowser Support
BrotliHighest (20-25%)Modern browsers
GzipGood (15-20%)All browsers

Configuration

Enable Compression

json
{
  "compression": {
    "enabled": true,
    "algorithms": ["brotli", "gzip"],
    "min_size": 1024
  }
}

Content Types

Automatically compressed content types:

TypeCompressed
text/htmlYes
text/cssYes
application/javascriptYes
application/jsonYes
image/svg+xmlYes
text/xmlYes

Compression Levels

Brotli Levels

LevelSpeedRatio
1-4FastLower
5-6BalancedMedium
7-11SlowHighest
json
{
  "compression": {
    "brotli_level": 6,
    "gzip_level": 6
  }
}

Content Negotiation

Sudun automatically selects compression based on Accept-Encoding:

code
Accept-Encoding: br, gzip, deflate

Response includes:

code
Content-Encoding: br
Vary: Accept-Encoding

Excluding Content

Skip compression for specific paths:

json
{
  "compression": {
    "exclude": [
      "/api/download/*",
      "*.zip",
      "*.gz"
    ]
  }
}

API Reference

bash
curl -X GET https://api.Sudun.com/v1/domains/{domain}/compression \
  -H "Authorization: Bearer YOUR_API_KEY"
bash
curl -X PUT https://api.Sudun.com/v1/domains/{domain}/compression \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "{\"enabled\": true, \"brotli_level\": 6}"

Need help? Contact support@Sudun.com