{"categories":[{"label":"WWW/HTTP","url":"https://skillfed.io/packages/category/internet-www-http/5"}],"enrichment":{"capability":"Middleware for Starlette that compresses HTTP responses using Brotli, GZip, Deflate, or ZSTD algorithms based on client Accept-Encoding headers.","skillfed_tags":["asgi-middleware","compression"],"use_cases":["Reduce bandwidth and improve response times for text-heavy APIs by automatically compressing JSON or HTML responses.","Support multiple compression standards (Brotli, GZip, Deflate, ZSTD) to accommodate diverse client preferences without manual negotiation.","Exclude specific routes or media types (e.g., already-compressed images) from compression to avoid overhead.","Tune compression level per deployment environment to balance CPU cost and bandwidth savings."],"what_it_does":"starlette-cramjam is a Starlette ASGI middleware that automatically compresses HTTP responses using one or more compression algorithms (Brotli, GZip, Deflate, ZSTD). It inspects the client's Accept-Encoding header and applies the appropriate algorithm, handling both standard and streaming responses transparently. The middleware is built on top of cramjam, which provides Rust-backed compression bindings for performance.\n\nYou configure it by specifying which compression algorithms to support, the compression level (0\u201311), a minimum response size threshold to avoid compressing small payloads, and optional path or media-type exclusions. It integrates directly into Starlette's middleware stack with minimal setup and requires only Python 3.11 or later.","worth_installing":"Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and solves a common Starlette use case with a clean API. Install it if you need HTTP compression middleware for a Starlette application and want support for multiple algorithms beyond the standard library."},"id":"starlette-cramjam","links":{"html":"https://skillfed.io/packages/starlette-cramjam","md":"https://skillfed.io/packages/starlette-cramjam.md","pypi":"https://pypi.org/project/starlette-cramjam/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-04-27","license_spdx":null,"license_treatment":"permissive","name":"starlette-cramjam","python_support":"supports_current","summary":"Cramjam integration for Starlette ASGI framework."},"popularity":{"monthly_downloads":212832,"position":9449,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.7.0"}
