-
Notifications
You must be signed in to change notification settings - Fork 10
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
github.com/klauspost/compress for snappy #10
Comments
Hi, I'm not as familiar with snappy compared to lz4 and zstd. I'd be happy to switch if you benchmarked and found @klauspost's implementation faster though. |
It can either be faster or compresses more and sometimes both. https://github.com/klauspost/compress/tree/master/s2#snappy-compatibility Replace
Options to consider: WriterBetterCompression gives better compression. WriterConcurrency(1) if you want to disable multithreaded compression.
|
If we were to add s2, I think that should be registered with the grpc framework under the name "s2" instead of "snappy" for compatibility reasons. |
Yeah, adding it as a separate option would be nice (and trivial) FWIW here is a comparison of different types: https://twitter.com/sh0dan/status/1532298056082804736 |
@klauspost: re s2, if I use WriterConcurrency(1) can I safely put s2.Writer's in a sync.Pool without leaking memory? |
@mostynb You can do that either way. It does not keep goroutines active. |
OK, it's just that the s2.NewWriter docs say that resources might not be released if Close isn't called (as would happen with sync.Pool):
|
…ent than the google snappy package Relates to #10.
@jzelinskie: I created a PR which you can experiment with if you like: #12. |
…ent than the google snappy package Relates to #10.
…ent than the google snappy package Relates to #10.
Hey there!
I noticed that this library doesn't use the snappy library from klauspost/compress, but it does import this library for zstd.
A cursory look makes it appear to be faster. Is there a reason why you aren't using it? Is it worth a PR?
The text was updated successfully, but these errors were encountered: