You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the problem your feature solves, or the need it fulfills?
Compression level can currently be set as following:
session.downstream_compression.adjust_level(9);
This calls ResponseCompressionCtx.adjust_level(). However, with gzip, brotli and zstd there are currently three compression algorithms supported, in future possibly more. The given compression level applies to all of them. And compression level 9 for gzip is radically different from compression level 9 for zstd.
Describe the solution you'd like
This API needs per-algorithm compression levels. So maybe adjust_level_gzip(9) and adjust_level_zstd(18), or some method taking an algorithm identifier along with a compression level. If necessary, method adjust_level() can be kept around for backwards compatibility and will still set the compression level for all algorithms.
Describe alternatives you've considered
It’s possible to set the compression level to 3 or 4 – these levels just so happen to provide a good tradeoff between size and speed for all of the supported algorithms. But that’s merely a coincidence.
The text was updated successfully, but these errors were encountered:
palant
changed the title
It should be possible to set compression level for each algorithm
Allow setting compression level per algorithm
May 6, 2024
What is the problem your feature solves, or the need it fulfills?
Compression level can currently be set as following:
This calls ResponseCompressionCtx.adjust_level(). However, with gzip, brotli and zstd there are currently three compression algorithms supported, in future possibly more. The given compression level applies to all of them. And compression level 9 for gzip is radically different from compression level 9 for zstd.
Describe the solution you'd like
This API needs per-algorithm compression levels. So maybe
adjust_level_gzip(9)
andadjust_level_zstd(18)
, or some method taking an algorithm identifier along with a compression level. If necessary, methodadjust_level()
can be kept around for backwards compatibility and will still set the compression level for all algorithms.Describe alternatives you've considered
It’s possible to set the compression level to 3 or 4 – these levels just so happen to provide a good tradeoff between size and speed for all of the supported algorithms. But that’s merely a coincidence.
The text was updated successfully, but these errors were encountered: