The documentation from the javadoc for the method is as such:
Set compression level to use while producing gzip responses.
Gzip is off by default (compression level is null).
This raises some questions regarding the gzip support:
1) When compression level has a non-null value, are all responses encoded or only ones for requests that have an accept-encoding: gzip header?
2) Can Jooby automatically decode incoming requests with a content-encoding: gzip header? If not, what is the recommended way of achieving this? My current solution is to read from input stream produced by GZIPInputStream(context.body().stream())) but I have a suspicion that the performance of this approach isn't ideal.
PS. I'm using netty as the underlying server in case that's relevant.
From the documentation, I noticed that
ServerOptions
has a method called setCompressionLevel.The documentation from the javadoc for the method is as such:
This raises some questions regarding the gzip support:
1) When compression level has a non-null value, are all responses encoded or only ones for requests that have an
accept-encoding: gzip
header?2) Can Jooby automatically decode incoming requests with a
content-encoding: gzip
header? If not, what is the recommended way of achieving this? My current solution is to read from input stream produced byGZIPInputStream(context.body().stream()))
but I have a suspicion that the performance of this approach isn't ideal.PS. I'm using netty as the underlying server in case that's relevant.