Add new compression algos: ZSTD & BROTLI superior to GZIP

Every browser and newer webserver now already has ZSTD and Brotli file compression implemented. They are faster, more efficient and compress better than GZIP, which soon will (is) be obsolete and sunsetted by all.

Proposal to have these new compression algorithms added (or even have them replace) GZIP in the Lucee admin output section, along with compression level (1-9) and a minimal output size option, above which compression will kick in.

Benefits will include faster Lucee output, faster cfm page loading to the client browser as well as possibly more pages to be served within the same buffer/request response. Apparently ZSTD is superior.

Unfortunately this must be done at the Lucee servlet level, even though Java 21 is capable of Brotli compression, its implementation does not work directly with Lucee dynamic file output by tinkering in the server.xml or web.xml settings.

Ref. article (could not make it work):

Similar topic on this forum: Bug: GZip compression + new request (Brotli) - #5 by stevieosaurus

Yeah, this has also been on my radar too

That said, but isn’t this something the webserver usually handles?

I think most people deploy Lucee behind a webserver?

That was my reasoning so as well, alas webservers and rev.proxys only seem to apply custom compression to static text files (css, js, xml, fonts, etc.) otherwise, in the case of dynamic content, they either deffer said task to the app server - in our case Lucee/Tomcat - or seem to respect, keep & serve those as received.

Even with every file compression setting turned off (Lucee admin, Tomcat connector in the server.xml, webserver setttings) cfm files still get served as gzip, while all others are br as revealed in the response header.

Screenshot 2026-05-25 at 12-06-37 OpenLiteSpeed WebAdmin Console

Update on this - both Brotli & ZSTD are now available for JAVA implementation on Maven repo:

Brotli (br) - the text-content winner (2016):
https://mvnrepository.com/artifact/org.eclipse.jetty.compression/jetty-compression-brotli
also on GitHub as Brotli4j: GitHub - hyperxpro/Brotli4j: Brotli4j provides Brotli compression and decompression for Java. · GitHub

Zstandard (zstd) - the speed-and-ratio compromise (2018):
https://mvnrepository.com/artifact/com.github.luben/zstd-jni

Excellent article on when & how to use each:
TL;DR: Brotli for text compression & small files, ZSTD for archives and server side content, much faster and less resource intensive, GZIP - never, deprecated.
Allow a minimal file size to be specified under which no compression is applied, as well as the desired compression level.

Comparison benchmark results, browser support:

Please consider implementing them soon, as they have both been tested and established as web standards and would greatly improve both processing and transfer speeds for Lucee apps.

Thanks for the update and the Maven / browser-support pointers.

Tracked:

Your notes on dynamic CFML often still needing compression in the app server (vs reverse proxy for static assets), plus level and minimum-size options, are captured on those tickets.

1 Like