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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support negative values for VarLongCodec #438

Merged

Conversation

aartigao
Copy link
Contributor

These days I'm revisiting all the stuff around VarIntCodec/VarLongCodec because I plan to add support for signed zig-zag encoding for a side project I'm working on (a pure Scala Kafka protocol implementation).

It draw my attention though that VarLongCodec doesn't support negative values. According to the original PR :

negative longs aren't even supported in the first place.

But I don't see a reason for not supporting them 馃. In fact, the implementation used in Kafka codebase supports it out-of-the-box and I can't see any argument against it in the Wikipedia link from the original PR.

Please, let me know if I'm missing something 馃檹馃徑

Support negative values for `VarLongCodec`.
@mpilquist
Copy link
Contributor

Looks good to me!

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.

None yet

2 participants