diff -urEbwB netty-netty-4.1.72.Final.orig/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java netty-netty-4.1.72.Final/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java
--- netty-netty-4.1.72.Final.orig/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java	2021-12-13 17:10:20.554957183 +0100
+++ netty-netty-4.1.72.Final/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java	2021-12-13 17:32:02.990725038 +0100
@@ -15,10 +15,8 @@
  */
 package io.netty.handler.codec.compression;
 
-import com.aayushatharva.brotli4j.encoder.Encoder;
-
 /**
- * Standard Compression Options for {@link BrotliOptions},
+ * Standard Compression Options for
  * {@link GzipOptions} and {@link DeflateOptions}
  */
 public final class StandardCompressionOptions {
@@ -28,47 +26,6 @@
     }
 
     /**
-     * Default implementation of {@link BrotliOptions} with {@link Encoder.Parameters#setQuality(int)} set to 4
-     * and {@link Encoder.Parameters#setMode(Encoder.Mode)} set to {@link Encoder.Mode#TEXT}
-     */
-    public static BrotliOptions brotli() {
-        return BrotliOptions.DEFAULT;
-    }
-
-    /**
-     * Create a new {@link BrotliOptions}
-     *
-     * @param parameters {@link Encoder.Parameters} Instance
-     * @throws NullPointerException If {@link Encoder.Parameters} is {@code null}
-     */
-    public static BrotliOptions brotli(Encoder.Parameters parameters) {
-        return new BrotliOptions(parameters);
-    }
-
-    /**
-     * Default implementation of {@link ZstdOptions} with{compressionLevel(int)} set to
-     * {@link ZstdConstants#DEFAULT_COMPRESSION_LEVEL},{@link ZstdConstants#DEFAULT_BLOCK_SIZE},
-     * {@link ZstdConstants#MAX_BLOCK_SIZE}
-     */
-    public static ZstdOptions zstd() {
-        return ZstdOptions.DEFAULT;
-    }
-
-    /**
-     * Create a new {@link ZstdOptions}
-     *
-     * @param  blockSize
-     *           is used to calculate the compressionLevel
-     * @param  maxEncodeSize
-     *           specifies the size of the largest compressed object
-     * @param  compressionLevel
-     *           specifies the level of the compression
-     */
-    public static ZstdOptions zstd(int compressionLevel, int blockSize, int maxEncodeSize) {
-        return new ZstdOptions(compressionLevel, blockSize, maxEncodeSize);
-    }
-
-     /**
      * Default implementation of {@link GzipOptions} with
      * {@code compressionLevel()} set to 6, {@code windowBits()} set to 15 and {@code memLevel()} set to 8.
      */
diff -urEbwB netty-netty-4.1.72.Final.orig/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java netty-netty-4.1.72.Final/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java
--- netty-netty-4.1.72.Final.orig/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java	2021-12-13 17:10:20.518956968 +0100
+++ netty-netty-4.1.72.Final/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java	2021-12-13 17:48:39.308669475 +0100
@@ -22,9 +22,6 @@
 import io.netty.channel.ChannelHandlerContext;
 import io.netty.channel.embedded.EmbeddedChannel;
 import io.netty.handler.codec.MessageToByteEncoder;
-import io.netty.handler.codec.compression.Brotli;
-import io.netty.handler.codec.compression.BrotliEncoder;
-import io.netty.handler.codec.compression.BrotliOptions;
 import io.netty.handler.codec.compression.CompressionOptions;
 import io.netty.handler.codec.compression.DeflateOptions;
 import io.netty.handler.codec.compression.GzipOptions;
@@ -32,9 +29,6 @@
 import io.netty.handler.codec.compression.ZlibCodecFactory;
 import io.netty.handler.codec.compression.ZlibEncoder;
 import io.netty.handler.codec.compression.ZlibWrapper;
-import io.netty.handler.codec.compression.Zstd;
-import io.netty.handler.codec.compression.ZstdEncoder;
-import io.netty.handler.codec.compression.ZstdOptions;
 import io.netty.util.internal.ObjectUtil;
 
 /**
@@ -47,10 +41,8 @@
 public class HttpContentCompressor extends HttpContentEncoder {
 
     private final boolean supportsCompressionOptions;
-    private final BrotliOptions brotliOptions;
     private final GzipOptions gzipOptions;
     private final DeflateOptions deflateOptions;
-    private final ZstdOptions zstdOptions;
 
     private final int compressionLevel;
     private final int windowBits;
@@ -134,10 +126,8 @@
         this.windowBits = ObjectUtil.checkInRange(windowBits, 9, 15, "windowBits");
         this.memLevel = ObjectUtil.checkInRange(memLevel, 1, 9, "memLevel");
         this.contentSizeThreshold = ObjectUtil.checkPositiveOrZero(contentSizeThreshold, "contentSizeThreshold");
-        this.brotliOptions = null;
         this.gzipOptions = null;
         this.deflateOptions = null;
-        this.zstdOptions = null;
         this.factories = null;
         this.supportsCompressionOptions = false;
     }
@@ -166,27 +156,18 @@
      */
     public HttpContentCompressor(int contentSizeThreshold, CompressionOptions... compressionOptions) {
         this.contentSizeThreshold = ObjectUtil.checkPositiveOrZero(contentSizeThreshold, "contentSizeThreshold");
-        BrotliOptions brotliOptions = null;
         GzipOptions gzipOptions = null;
         DeflateOptions deflateOptions = null;
-        ZstdOptions zstdOptions = null;
         if (compressionOptions == null || compressionOptions.length == 0) {
-            brotliOptions = Brotli.isAvailable() ? StandardCompressionOptions.brotli() : null;
             gzipOptions = StandardCompressionOptions.gzip();
             deflateOptions = StandardCompressionOptions.deflate();
-            zstdOptions = Zstd.isAvailable() ? StandardCompressionOptions.zstd() : null;
         } else {
             ObjectUtil.deepCheckNotNull("compressionOptions", compressionOptions);
             for (CompressionOptions compressionOption : compressionOptions) {
-                if (compressionOption instanceof BrotliOptions) {
-                    // if we have BrotliOptions, it means Brotli is available
-                    brotliOptions = (BrotliOptions) compressionOption;
-                } else if (compressionOption instanceof GzipOptions) {
+                if (compressionOption instanceof GzipOptions) {
                     gzipOptions = (GzipOptions) compressionOption;
                 } else if (compressionOption instanceof DeflateOptions) {
                     deflateOptions = (DeflateOptions) compressionOption;
-                } else if (compressionOption instanceof ZstdOptions) {
-                    zstdOptions = (ZstdOptions) compressionOption;
                 } else {
                     throw new IllegalArgumentException("Unsupported " + CompressionOptions.class.getSimpleName() +
                             ": " + compressionOption);
@@ -196,8 +177,6 @@
 
         this.gzipOptions = gzipOptions;
         this.deflateOptions = deflateOptions;
-        this.brotliOptions = brotliOptions;
-        this.zstdOptions = zstdOptions;
 
         this.factories = new HashMap<String, CompressionEncoderFactory>();
 
@@ -207,12 +186,6 @@
         if (this.deflateOptions != null) {
             this.factories.put("deflate", new DeflateEncoderFactory());
         }
-        if (this.brotliOptions != null) {
-            this.factories.put("br", new BrEncoderFactory());
-        }
-        if (this.zstdOptions != null) {
-            this.factories.put("zstd", new ZstdEncoderFactory());
-        }
 
         this.compressionLevel = -1;
         this.windowBits = -1;
@@ -285,8 +258,6 @@
     @SuppressWarnings("FloatingPointEquality")
     protected String determineEncoding(String acceptEncoding) {
         float starQ = -1.0f;
-        float brQ = -1.0f;
-        float zstdQ = -1.0f;
         float gzipQ = -1.0f;
         float deflateQ = -1.0f;
         for (String encoding : acceptEncoding.split(",")) {
@@ -302,34 +273,20 @@
             }
             if (encoding.contains("*")) {
                 starQ = q;
-            } else if (encoding.contains("br") && q > brQ) {
-                brQ = q;
-            } else if (encoding.contains("zstd") && q > zstdQ) {
-                zstdQ = q;
             } else if (encoding.contains("gzip") && q > gzipQ) {
                 gzipQ = q;
             } else if (encoding.contains("deflate") && q > deflateQ) {
                 deflateQ = q;
             }
         }
-        if (brQ > 0.0f || zstdQ > 0.0f || gzipQ > 0.0f || deflateQ > 0.0f) {
-            if (brQ != -1.0f && brQ >= zstdQ && this.brotliOptions != null) {
-                return "br";
-            } else if (zstdQ != -1.0f && zstdQ >= gzipQ && this.zstdOptions != null) {
-                return "zstd";
-            } else if (gzipQ != -1.0f && gzipQ >= deflateQ && this.gzipOptions != null) {
+        if (gzipQ > 0.0f || deflateQ > 0.0f) {
+            if (gzipQ != -1.0f && gzipQ >= deflateQ && this.gzipOptions != null) {
                 return "gzip";
             } else if (deflateQ != -1.0f && this.deflateOptions != null) {
                 return "deflate";
             }
         }
         if (starQ > 0.0f) {
-            if (brQ == -1.0f && this.brotliOptions != null) {
-                return "br";
-            }
-            if (zstdQ == -1.0f && this.zstdOptions != null) {
-                return "zstd";
-            }
             if (gzipQ == -1.0f && this.gzipOptions != null) {
                 return "gzip";
             }
@@ -410,29 +367,4 @@
                     deflateOptions.windowBits(), deflateOptions.memLevel());
         }
     }
-
-    /**
-     * Compression Encoder Factory that creates {@link BrotliEncoder}s
-     * used to compress http content for br content encoding
-     */
-    private final class BrEncoderFactory implements CompressionEncoderFactory {
-
-        @Override
-        public MessageToByteEncoder<ByteBuf> createEncoder() {
-            return new BrotliEncoder(brotliOptions.parameters());
-        }
-    }
-
-    /**
-     * Compression Encoder Factory for create {@link ZstdEncoder}
-     * used to compress http content for zstd content encoding
-     */
-    private final class ZstdEncoderFactory implements CompressionEncoderFactory {
-
-        @Override
-        public MessageToByteEncoder<ByteBuf> createEncoder() {
-            return new ZstdEncoder(zstdOptions.compressionLevel(),
-                    zstdOptions.blockSize(), zstdOptions.maxEncodeSize());
-        }
-    }
 }
diff -urEbwB netty-netty-4.1.72.Final.orig/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java netty-netty-4.1.72.Final/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java
--- netty-netty-4.1.72.Final.orig/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java	2021-12-13 17:10:20.518956968 +0100
+++ netty-netty-4.1.72.Final/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java	2021-12-13 17:40:25.649724006 +0100
@@ -15,15 +15,12 @@
  */
 package io.netty.handler.codec.http;
 
-import static io.netty.handler.codec.http.HttpHeaderValues.BR;
 import static io.netty.handler.codec.http.HttpHeaderValues.DEFLATE;
 import static io.netty.handler.codec.http.HttpHeaderValues.GZIP;
 import static io.netty.handler.codec.http.HttpHeaderValues.X_DEFLATE;
 import static io.netty.handler.codec.http.HttpHeaderValues.X_GZIP;
 
 import io.netty.channel.embedded.EmbeddedChannel;
-import io.netty.handler.codec.compression.Brotli;
-import io.netty.handler.codec.compression.BrotliDecoder;
 import io.netty.handler.codec.compression.ZlibCodecFactory;
 import io.netty.handler.codec.compression.ZlibWrapper;
 
@@ -67,10 +64,6 @@
             return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
                     ctx.channel().config(), ZlibCodecFactory.newZlibDecoder(wrapper));
         }
-        if (Brotli.isAvailable() && BR.contentEqualsIgnoreCase(contentEncoding)) {
-            return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
-              ctx.channel().config(), new BrotliDecoder());
-        }
 
         // 'identity' or unsupported
         return null;
diff -urEbwB netty-netty-4.1.72.Final.orig/codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java netty-netty-4.1.72.Final/codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java
--- netty-netty-4.1.72.Final.orig/codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java	2021-12-13 17:10:20.530957040 +0100
+++ netty-netty-4.1.72.Final/codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java	2021-12-13 17:53:13.454306875 +0100
@@ -21,29 +21,23 @@
 import io.netty.channel.ChannelPromise;
 import io.netty.channel.embedded.EmbeddedChannel;
 import io.netty.handler.codec.ByteToMessageDecoder;
-import io.netty.handler.codec.compression.BrotliEncoder;
 import io.netty.handler.codec.compression.ZlibCodecFactory;
 import io.netty.handler.codec.compression.ZlibWrapper;
-import io.netty.handler.codec.compression.BrotliOptions;
 import io.netty.handler.codec.compression.CompressionOptions;
 import io.netty.handler.codec.compression.DeflateOptions;
 import io.netty.handler.codec.compression.GzipOptions;
 import io.netty.handler.codec.compression.StandardCompressionOptions;
-import io.netty.handler.codec.compression.ZstdEncoder;
-import io.netty.handler.codec.compression.ZstdOptions;
 import io.netty.util.concurrent.PromiseCombiner;
 import io.netty.util.internal.ObjectUtil;
 import io.netty.util.internal.UnstableApi;
 
 import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_ENCODING;
 import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_LENGTH;
-import static io.netty.handler.codec.http.HttpHeaderValues.BR;
 import static io.netty.handler.codec.http.HttpHeaderValues.DEFLATE;
 import static io.netty.handler.codec.http.HttpHeaderValues.GZIP;
 import static io.netty.handler.codec.http.HttpHeaderValues.IDENTITY;
 import static io.netty.handler.codec.http.HttpHeaderValues.X_DEFLATE;
 import static io.netty.handler.codec.http.HttpHeaderValues.X_GZIP;
-import static io.netty.handler.codec.http.HttpHeaderValues.ZSTD;
 
 /**
  * A decorating HTTP2 encoder that will compress data frames according to the {@code content-encoding} header for each
@@ -63,17 +57,15 @@
 
     private final boolean supportsCompressionOptions;
 
-    private BrotliOptions brotliOptions;
     private GzipOptions gzipCompressionOptions;
     private DeflateOptions deflateOptions;
-    private ZstdOptions zstdOptions;
 
     /**
      * Create a new {@link CompressorHttp2ConnectionEncoder} instance
      * with default implementation of {@link StandardCompressionOptions}
      */
     public CompressorHttp2ConnectionEncoder(Http2ConnectionEncoder delegate) {
-        this(delegate, StandardCompressionOptions.brotli(), StandardCompressionOptions.gzip(),
+        this(delegate, StandardCompressionOptions.gzip(),
                 StandardCompressionOptions.deflate());
     }
 
@@ -113,14 +105,10 @@
         ObjectUtil.deepCheckNotNull("CompressionOptions", compressionOptionsArgs);
 
         for (CompressionOptions compressionOptions : compressionOptionsArgs) {
-            if (compressionOptions instanceof BrotliOptions) {
-                brotliOptions = (BrotliOptions) compressionOptions;
-            } else if (compressionOptions instanceof GzipOptions) {
+            if (compressionOptions instanceof GzipOptions) {
                 gzipCompressionOptions = (GzipOptions) compressionOptions;
             } else if (compressionOptions instanceof DeflateOptions) {
                 deflateOptions = (DeflateOptions) compressionOptions;
-            } else if (compressionOptions instanceof ZstdOptions) {
-                zstdOptions = (ZstdOptions) compressionOptions;
             } else {
                 throw new IllegalArgumentException("Unsupported " + CompressionOptions.class.getSimpleName() +
                         ": " + compressionOptions);
@@ -258,15 +246,6 @@
         if (DEFLATE.contentEqualsIgnoreCase(contentEncoding) || X_DEFLATE.contentEqualsIgnoreCase(contentEncoding)) {
             return newCompressionChannel(ctx, ZlibWrapper.ZLIB);
         }
-        if (brotliOptions != null && BR.contentEqualsIgnoreCase(contentEncoding)) {
-            return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
-                    ctx.channel().config(), new BrotliEncoder(brotliOptions.parameters()));
-        }
-        if (zstdOptions != null && ZSTD.contentEqualsIgnoreCase(contentEncoding)) {
-            return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
-                    ctx.channel().config(), new ZstdEncoder(zstdOptions.compressionLevel(),
-                    zstdOptions.blockSize(), zstdOptions.maxEncodeSize()));
-        }
         // 'identity' or unsupported
         return null;
     }
diff -urEbwB netty-netty-4.1.72.Final.orig/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java netty-netty-4.1.72.Final/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java
--- netty-netty-4.1.72.Final.orig/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java	2021-12-13 17:10:20.530957040 +0100
+++ netty-netty-4.1.72.Final/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java	2021-12-13 17:55:03.506964279 +0100
@@ -19,15 +19,12 @@
 import io.netty.channel.ChannelHandlerContext;
 import io.netty.channel.embedded.EmbeddedChannel;
 import io.netty.handler.codec.ByteToMessageDecoder;
-import io.netty.handler.codec.compression.Brotli;
-import io.netty.handler.codec.compression.BrotliDecoder;
 import io.netty.handler.codec.compression.ZlibCodecFactory;
 import io.netty.handler.codec.compression.ZlibWrapper;
 import io.netty.util.internal.UnstableApi;
 
 import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_ENCODING;
 import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_LENGTH;
-import static io.netty.handler.codec.http.HttpHeaderValues.BR;
 import static io.netty.handler.codec.http.HttpHeaderValues.DEFLATE;
 import static io.netty.handler.codec.http.HttpHeaderValues.GZIP;
 import static io.netty.handler.codec.http.HttpHeaderValues.IDENTITY;
@@ -178,10 +175,6 @@
             return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
                     ctx.channel().config(), ZlibCodecFactory.newZlibDecoder(wrapper));
         }
-        if (Brotli.isAvailable() && BR.contentEqualsIgnoreCase(contentEncoding)) {
-            return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
-              ctx.channel().config(), new BrotliDecoder());
-        }
         // 'identity' or unsupported
         return null;
     }
