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

[feat] Consider using msgpack5 for compression #386

Open
robertsLando opened this issue Nov 16, 2022 · 0 comments
Open

[feat] Consider using msgpack5 for compression #386

robertsLando opened this issue Nov 16, 2022 · 0 comments

Comments

@robertsLando
Copy link

robertsLando commented Nov 16, 2022

https://github.com/mcollina/msgpack5

Option: compressMode: 'msgpack5' default to false

Then a compressed line in jsonl file will look like:

{"k":"1668612831392", "v": "0xaaaaaaa"}

Where aaaaaaa is the encoded object output from msgpack5 ecncode function.

To keep back compatibility we should allow to read uncompressed existing jsonl dbs, this means that when reading the db file and compression is enabled, when v is a string we should decode it with the compression choosed, otherwise read v as before

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

1 participant