-
Notifications
You must be signed in to change notification settings - Fork 349
Description
Hey @klauspost, thank you for writing this amazing library in Go. I work on https://github.com/dgraph-io/badger and we'd like to use this library instead of the CGO based ZSTD implementation.
We had a small chat about this a while ago https://discuss.dgraph.io/t/badger-compression-feedback/5478
Here's what we're compressing in badger
Badger stores key-values in a table called SST. Each SST is divided into blocks of 4KB by default. We'd like to compress these blocks.
Compression of the blocks is a one-time thing but decompression happens every time a new block is accessed (this is a frequent operation).
I understand that https://github.com/klauspost/compress/tree/master/zstd#blocks can be used to compress small blocks but is 4KB considered as a small block?
We'd like to have a fair tradeoff between the decompression speed and compression ratio.
I see that there are a bunch of options for encoding and decoding but because of my limited knowledge about how ZSTD works, I can't seem to figure out which ones should be tweaked.
I'd really appreciate it if you can help me pick the appropriate options for encoding/decoding :)