# Compression URL: /docs/deployment/compression/ Section: deployment Tags: compression, zstd, gzip, encoding -------------------------------------------------------------------------------- Overview Pounce negotiates content-encoding automatically based on the client's Accept-Encoding header. Priority order: zstd — Best compression ratio, lowest CPU cost (Python 3.14 stdlib, PEP 784) gzip — Universal browser support (stdlib zlib) identity — No compression (fallback) All compression uses Python standard library modules — zero external dependencies. Configuration Compression is enabled by default: # Enabled (default) pounce myapp:app --compression # Disabled pounce myapp:app --no-compression Programmatically: import pounce pounce.run( "myapp:app", compression=True, compression_min_size=500, # bytes ) Minimum Size Responses smaller than compression_min_size (default: 500 bytes) are sent uncompressed. Compressing tiny responses adds CPU cost without meaningful size reduction. Zstd (PEP 784) Python 3.14 includes compression.zstd in the standard library. Zstd provides: Better ratios than gzip at similar speeds Lower CPU cost than gzip at similar ratios Streaming mode — Pounce compresses response chunks as they're sent Modern browsers (Chrome, Firefox, Safari) support zstd content-encoding. Skipped Content Types Compression is automatically skipped for already-compressed content: Images (image/*) Video (video/*) Audio (audio/*) Archives (application/zip, application/gzip, etc.) WebSocket frames See Also Performance — Streaming-first design ServerConfig — Compression settings -------------------------------------------------------------------------------- Metadata: - Word Count: 176 - Reading Time: 1 minutes