Documentation Index
Fetch the complete documentation index at: https://docs.prism.byescaleira.com/llms.txt
Use this file to discover all available pages before exploring further.
Compression Middleware
PrismCompressionMiddleware compresses response bodies using deflate compression — powered by Apple’s native Compression framework. No zlib, no third-party libraries.
Setup
Enable Compression
Accept-Encoding: deflate, responses are automatically compressed. The middleware adds the Content-Encoding: deflate header.
When to Use
Compression is most effective for:- JSON API responses (typically 60-80% reduction)
- HTML pages
- Large text payloads
Production Stack
With Caching
Small responses (under ~150 bytes) may actually get larger after compression overhead. The middleware handles this gracefully — it only compresses responses above a meaningful threshold.