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

Min GZIP value #34

Open
wozuo opened this issue Nov 9, 2019 · 4 comments
Open

Min GZIP value #34

wozuo opened this issue Nov 9, 2019 · 4 comments

Comments

@wozuo
Copy link

wozuo commented Nov 9, 2019

Hi everyone, thanks for this project, great work!

I was wondering if there was an option to set a minimum value for the GZIP compression to take effect. The reason for this min value would me to prevent very small response bodies to be compressed which in some cases would make the responses even bigger.

Thanks and best regards
Marc

@mhtshhp
Copy link

mhtshhp commented Dec 6, 2019

I'll do it myself!!!!!It's too slow

@nanmu42
Copy link

nanmu42 commented Jan 21, 2020

I met this problem too.

I made a gzip middleware for gin and net/http, with support for setting minimum body size to gzip: https://github.com/nanmu42/gzip

Maybe you can have a try.

@wozuo
Copy link
Author

wozuo commented Jan 21, 2020

That‘s great @nanmu42 I‘ll give it a try in the coming days!

@sharepusher
Copy link

It's a very basic and easy function, hope it can be supported, as it may waster lots of bandwidth to gzip small response

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

No branches or pull requests

4 participants