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

Add support to compress database using zstd algorithm #11498

Closed

Conversation

TOCK-Chiu
Copy link

This pull request adds support to compress database using zstd algorithm. Zstd usually provides faster compression/decompression speeds and often provides better compression as well for large databases. In my rough test, gzip took around 4 seconds to compress a large database (which contains a 100 MB enwiki8 attachment), while zstd took around 1 second. The zstd-compressed database file is also 2.6% smaller (35,588,971 bytes vs 36,553,374 bytes).

Screenshots

screenshot

Testing strategy

Added unit test. The database file tests/data/Format410ZstdCompressed.kdbx used in unit test was manually edited from tests/data/Format400.kdbx.

Type of change

  • ✅ New feature (change that adds functionality)

This commit makes the original private class of QtIOCompressor more
algorithm orthogonal. Zlib details are now moved to a dedicated derived
private class that implements the interfaces. With this, new algorithms
can be added by similar way.
@TOCK-Chiu TOCK-Chiu force-pushed the feature/zstd-compression branch from 8f311ae to cf52387 Compare November 26, 2024 14:25
@droidmonkey
Copy link
Member

This is not in the kdbx4 standard and we will not support it. Large databases like this are also an anti pattern. Use cryptomator to store large files.

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

Successfully merging this pull request may close these issues.

2 participants