Skip to content

Conversation

@smiklosovic
Copy link
Contributor

Thanks for sending a pull request! Here are some tips if you're new here:

  • Ensure you have added or run the appropriate tests for your PR.
  • Be sure to keep the PR description updated to reflect all changes.
  • Write your PR title to summarize what this PR proposes.
  • If possible, provide a concise example to reproduce the issue for a faster review.
  • Read our contributor guidelines
  • If you're making a documentation change, see our guide to documentation contribution

Commit messages should follow the following format:

<One sentence description, usually Jira title or CHANGES.txt summary>

<Optional lengthier description (context on patch)>

patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####

Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>

The Cassandra Jira

@smiklosovic smiklosovic requested a review from yifan-c November 14, 2025 14:59
Copy link
Contributor

@yifan-c yifan-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to share more context.
Looking at https://github.com/facebook/zstd/blob/dev/lib/compress/clevels.h, the srcSize plays a big role in memory consumption. srcSize is the size of the uncompressed data.
In the case of smaller than 16 KiB, even level 22 does not use much memory.
I am not sure what best decision to make :) Would like to here from you too.

*/
public class ZstdCompressor extends ZstdCompressorBase implements ICompressor
{
public static final int BEST_COMPRESSION_LEVEL = Zstd.maxCompressionLevel();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making ZstdCompressor backward compatible!

Maybe add a comment to explain why there are 2 different BEST_COMPRESSION_LEVEL

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