Feature Request: Support brotli precompressed static files
Hello,
I want to propose the support of brotli precompressed files. As we may know, brotli is rather expensive on the compression side, but cheaper on the decompression side. So the server has to work harder to compress while the client has an easier time decompressing it. Also it produces smaller files, which helps with slow networks.
So it would be cool if rocket-nginx would support precompressed br files, I was assuming. Because then, nginx doesn't have to compress them, but just get it from the file system and deliver it to the client.
In my test with chrome dev tools on my AMD Ryzen 9 3900 server, it saved 4ms to deliver the precompressed file vs. compress the html file on the fly (13ms vs. 17ms) - which is almost 25% faster (brotli level 6 for everyday use, 11 for precompressed files).
Shameless plug, I created a cronjob-able script that creates the .br files. You can find it here. Or think of an own solution. Because WP Rocket doesn't seem to care too much about this feature. https://github.com/realrellek/auto-brotli
Anyway. PR is coming.
Thank you for considering. :)