Class CompressionSettings

java.lang.Object
com.iizix.jetty.CompressionSettings

public final class CompressionSettings extends Object
Static default settings for the Jetty 12.1.x compression framework, read by WSHelper.createGZipHandler(org.eclipse.jetty.server.Handler) when wiring up the gzip, brotli and zstandard Compression instances.

All fields are public static volatile so they can be inspected and configured externally (e.g. by the iiziServer Admin program at runtime, before the web server is started). Values are read by createGZipHandler once per invocation, so changes apply to subsequent web server starts -- they are not hot-swapped into the compression handler of an already-running server. To re-apply changed settings the web server must be stopped and started again.

The defaults below are initialised to the best-compression end of each algorithm's range. This trades server CPU and memory for smaller payload sizes. For workloads with high concurrency or many small responses the encoder levels can be tuned down (gzip 9 -> 6, brotli 11 -> 4, zstandard 22 -> 3 are the usual "balanced" choices).

Each algorithm has its own nested final class with all fields grouped together. The nested classes cannot be instantiated. The outer class cannot be instantiated either -- it is a pure namespace.

Author:
Christopher Mindus