How to enable Brotli compression for server responses? #2497
Answered
by
seanmonstar
spikecodes
asked this question in
Q&A
-
Hi, I'm interested in enabling text compression for my Hyper-powered server to improve load time. Does Hyper natively support Brotli compression? Or would I have to use an external text compression library such as rust-brotli? Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Answered by
seanmonstar
Apr 8, 2021
Replies: 1 comment 1 reply
-
hyper does not include a Brotli implementation in it. You could probably use something like |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
spikecodes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hyper does not include a Brotli implementation in it. You could probably use something like
async-compression
to create aStream
that compresses your data, and make that be the body element of yourhttp::Response
s.