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 getUnsigned() and putUnsigned() methods. #574

Merged
merged 3 commits into from
May 31, 2022
Merged

Conversation

before31
Copy link
Contributor

add getUnsigned() and putUnsigned() methods to get the correct unsigned integer value directly.

@saudet
Copy link
Member

saudet commented May 27, 2022

Maybe we also want to add getUnsignedShort(), getUnsignedInt() etc while we're at it? Or are you OK with just bytes for now?

@before31
Copy link
Contributor Author

When you say getUnsignedInt(), you mean:

  • I need to get the next FOUR bytes and combine them into an integer? or,
  • I get the next ONE byte and operate '& 0xFF' to convert it to an unsigned integer(0-255)?

In my getUnsigned() implementation, it is the later one. The getUnsigned method actually returns a integer value in the range 0-255, and my need is that.

@saudet
Copy link
Member

saudet commented May 31, 2022

Your getUnsigned() is fine, I'm talking about 16, 32, and 64-bit values. You're never going to need those?

@before31
Copy link
Contributor Author

So far, I may not need those.

@saudet saudet merged commit 12d7cbc into bytedeco:master May 31, 2022
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