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

Unable to specify LZ4 compression level #778

Closed
asg0451 opened this issue Jul 17, 2024 · 3 comments · Fixed by #781
Closed

Unable to specify LZ4 compression level #778

asg0451 opened this issue Jul 17, 2024 · 3 comments · Fixed by #781
Labels
bug Something isn't working has pr

Comments

@asg0451
Copy link
Contributor

asg0451 commented Jul 17, 2024

CompressionCoded.WithLevel casts its argument to byte and maxes out at 127. -

if level > 127 {

However, LZ4 compression levels are much larger than that - https://github.com/pierrec/lz4/blob/v4/options.go#L155 - they are defined as 0, 512, 1024, ... , 131072.

Specifying LZ4 compression level in franz-go therefore will always result in the default.

@twmb
Copy link
Owner

twmb commented Jul 17, 2024

I think this should be a relatively small fix by converting that internally to an int

@twmb twmb added the bug Something isn't working label Jul 17, 2024
@asg0451
Copy link
Contributor Author

asg0451 commented Jul 17, 2024

i agree. i can take a stab at this today.

@asg0451
Copy link
Contributor Author

asg0451 commented Jul 17, 2024

#781

@twmb twmb added the has pr label Jul 21, 2024
@twmb twmb closed this as completed in #781 Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has pr
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants