mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
Add support for -r (recursive) flag in the Linux CLI #425
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @janvladimirmostert on GitHub (May 27, 2022).
I'm pre-zipping static content before bundling it in a Docker container.
This allows me to serve static content gzipped if there's an
accept-encodingheader that containsgzipwithout putting extra load on the CPU when serving gzipped content.gzip -rk9 ./build/processedResources/jvm/main/static/* || exitI wanted to add support for Brotli if the
accept-encodingheader containsbrand then serve whichever one is smaller, file.ext.br or file.ext.gzbrotli -rk9 ./build/processedResources/jvm/main/static/* || exitTurns out
-kand-9does exactly the same asgzip, but the-rflag is not supported which caught me by surprise.Short-term workaround is to use
find ... | args ... | brotli -k9after I've extensively studied thefindandxargsman pages, long-term, it would be nice if I can just do-rand save the hassle of using 3 commands to do one thing.@eustas commented on GitHub (May 27, 2022):
Oh, never noticed that option in gzip. Sounds like a good addition. Will implement it, when I have spare cycles. Thanks for the heads-up.
@Enelar commented on GitHub (Jul 21, 2022):
+1 To this issue, we using
gzip --best -r .for our docker nginx images andgzlp_static on;