Alternative compression methods
See original GitHub issueIs your feature request related to a problem? Please describe.
I’m using Keyv to wrap connection with Redis and I would like to compress the content cached in Redis. This caching process is time-sensitive, so it should favour speed over compression rate. Thus why I’m atm using separate wrapper using snappy
as the compression algorithm. I did performance tests and it turned out that Brotli
in BROTLI_MIN_QUALITY
mode is almost 2x slower than snappy
!
So, the real problem for me is that Brotli
is the built-in compression mechanism that cannot be easily changed for anything else.
Describe the solution you’d like
I would like to have some options if it goes to choosing the compression method that can be used with Keyv
.
Describe alternatives you’ve considered
Atm I’m using custom kdybicz/apollo-server-snappy-cache-wrapper wrapped for Keyv
.
Additional context
Scotty, We Need More Power!
Issue Analytics
- State:
- Created a year ago
- Comments:13 (8 by maintainers)
Top GitHub Comments
@alfaproject and @kdybicz we have merged in the changes and will be planning a release this week. Also, will add in support for snappy as a compression provider and most likely gzip.
Closing this issue as we have now published the compression changes. https://github.com/jaredwray/keyv/releases/tag/2022-09-02