-
Notifications
You must be signed in to change notification settings - Fork 62
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
[Question] Read 3 bytes with a uint and advance only those 3 bytes on the stream #186
Comments
Still struggle with this one... |
Can you give me some more info? I just wrote a simple test that seems to work but I might be missing something. |
Ahh it's big endian. Unfortunately there is a bug involving big endian and bit fields. I've spent hours trying to fix it but unfortunately it's incredibly complex. I need to at least add a check that will throw in these cases. Sorry about that, I'll try to get back to it soon! |
Thanks for looking into it. |
As much as I would like to blame something else, it is unfortunately all my own code! The issue has to do with assumptions I made when doing bit-packing early on. Unfortunately, fixing it will mean rewriting quite a bit of the underlying bit field assemblage, which gets complicated fast. If you're interested, most of the rabbit hole is contained in |
@sn4k3 could you perhaps but together a couple of Test Cases for this in Github (within the FieldBitOffset / Endianess stuff probably makes sense). I've had a bit of a dig through the BoundedStream stuff recently, so might be able to have a look at this problem also. |
I have some situations where the format have uint's with 3 bytes, currently is it possible to define an uint and deserialize/serialize in 3 byte order? Making stream only to advance that 3 bytes so the next field will decode/encode at position 3 rather than 4?
PS: Should be cool to enable github discussions to use it as a forum board for questions instead the need to use issues for that purpose
The text was updated successfully, but these errors were encountered: