Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for -r (recursive) flag in the Linux CLI #970

Open
janvladimirmostert opened this issue May 27, 2022 · 2 comments
Open

Add support for -r (recursive) flag in the Linux CLI #970

janvladimirmostert opened this issue May 27, 2022 · 2 comments

Comments

@janvladimirmostert
Copy link

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-encoding header that contains gzip without putting extra load on the CPU when serving gzipped content.
gzip -rk9 ./build/processedResources/jvm/main/static/* || exit

I wanted to add support for Brotli if the accept-encoding header contains br and then serve whichever one is smaller, file.ext.br or file.ext.gz
brotli -rk9 ./build/processedResources/jvm/main/static/* || exit

Turns out -k and -9 does exactly the same as gzip, but the -r flag is not supported which caught me by surprise.

Short-term workaround is to use find ... | args ... | brotli -k9 after I've extensively studied the find and xargs man pages, long-term, it would be nice if I can just do -r and save the hassle of using 3 commands to do one thing.

@eustas
Copy link
Collaborator

eustas commented 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
Copy link

Enelar commented Jul 21, 2022

+1 To this issue, we using gzip --best -r . for our docker nginx images and gzlp_static on;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants