Skip to content

Commit 1ba7288

Browse files
GZipMiddleware example: use compresslevel=5.
compresslevel=5 is typically a better tradeoff than 9, e.g. see: https://tukaani.org/lzma/benchmarks.html
1 parent 47d4f4a commit 1ba7288

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs_src/advanced_middleware/tutorial003.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
app = FastAPI()
55

6-
app.add_middleware(GZipMiddleware, minimum_size=1000)
6+
app.add_middleware(GZipMiddleware, minimum_size=1000, compresslevel=5)
77

88

99
@app.get("/")

0 commit comments

Comments
 (0)