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

Endianness support for non byte-aligned values #210

Closed
jcbooth2 opened this issue Oct 22, 2020 · 1 comment
Closed

Endianness support for non byte-aligned values #210

jcbooth2 opened this issue Oct 22, 2020 · 1 comment

Comments

@jcbooth2
Copy link

jcbooth2 commented Oct 22, 2020

For example if I wanted to create a little-endian unsigned integer of only length 12, the interface could be the same as what already exists:

bits = Bits(uintle=value, length=12)

@scott-griffiths
Copy link
Owner

Hi. Sorry for the delay. I'm not sure you've got the terminology correct in your question. The endian representations deal in which order the whole bytes that make up the number are used to construct the integer - this doesn't make sense if the integer isn't a whole number of bytes long.

What you might be asking about is the ability to read the whole integer 'backwards' bit by bit. This is covered in the on-going request #156.

If that's not what you're asking about could you provide a concrete example of what you expect to happen with the code snipped you gave. Thanks.

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

No branches or pull requests

2 participants