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

Support independent mode in LZ4 compressor #125

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

ods
Copy link
Contributor

@ods ods commented Jan 13, 2024

This PR adds 2 parameters to Compressor class: block_linked to allow switching to independent block mode and content_checksum to allow disabling content checksum. The parameters are named the same way, as they are in python-lz4.

Motivation. cramjam is used in aiokafka for most codecs, but it's not possible to use it for LZ4. The problem is that kafka broker doesn't support linked block mode (see KIP-57 for the reference). Although kafka broker does support content checksum, it doesn't use it itself and using it in producer may cause problems with some consumers.

Copy link
Owner

@milesgranger milesgranger left a comment

Choose a reason for hiding this comment

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

Excellent, thank you! 👍

@milesgranger milesgranger merged commit 505f3f7 into milesgranger:master Jan 15, 2024
65 checks passed
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