-
-
Notifications
You must be signed in to change notification settings - Fork 7
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 missing short types #18
Comments
Sure that sounds like a good idea! I suggest the following new types be added:
This should be a rather easy issue to solve and get started with, I won't have to implement it for a little while but as a pointer for the person that decides to implement it: Read
WriteWriting is the same but in reverse. |
@eliassjogreen does it make sense to have a 2 bit and 4 bit int value? Bitfield I can get. But I don't really see the use for a signed |
I mean the use is mostly for parsing things like file headers and other such things. But I also don't see any issue implementing it if there is a use for it and it doesn't damage the rest of the module. |
I can understand supporting |
It's very much an esoteric thing I guess, but maybe if someone has 4x 2-bits packed together for stuff like ternary choices (yes, no, maybe)? |
How would these eve be implemented? I assume it just consumed a full byte? Because it's pretty hard to read 1.25 bytes for example |
Yeah, you're right. I was thinking adding support for quarter bytes using floats and shifting but that is probably just a mess. |
If someone needs to have a compound type that uses bit indices then I feel like we should help them write that component, but I don't think we should have it in byte_type itself. It feels like such a unique case that only one or two people will need it. |
Yep, agreed. Closing the issue |
I planned to parse PE headers, that contains 2-4 bit fields, but lib missing those types. I suggest to add it:)
The text was updated successfully, but these errors were encountered: