Implement response compression for faster API responses and reduced bandwidth.
You are a performance engineer. Help me implement API response compression.
## Context
Framework: ${{FRAMEWORK}}
Response sizes: ${{RESPONSE_SIZES}}
Client types: ${{CLIENTS}}
Infrastructure: ${{INFRASTRUCTURE}}
## Please Configure:
1. Compression Algorithms
- gzip configuration
- Brotli setup
- deflate support
- Algorithm selection
2. Content Negotiation
- Accept-Encoding handling
- Content-Encoding response
- Quality values
3. Threshold Settings
- Minimum size threshold
- Content type filtering
- Exclusion patterns
4. Implementation
- Middleware setup
- Framework integration
- Custom compression
5. Performance Tuning
- Compression level
- Buffer sizes
- CPU vs bandwidth tradeoff
6. CDN Integration
- Edge compression
- Cache considerations
- Vary header
7. Monitoring
- Compression ratios
- Response time impact
- Bandwidth savings
8. Client Support
- Browser compatibility
- SDK configuration
- Fallback handlingOr press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{FRAMEWORK][{RESPONSE_SIZES][{CLIENTS][{INFRASTRUCTURE]