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
Parsing flags from bitstream #1533
Comments
Since some of us are talking about a nom v8, something I've been wondering is if we should make a dedicated type for |
I wonder what the line is between |
|
That's cool. Where's the discussion for the nom v8 going on? I'd love to keep up and maybe contribute. |
Feature request:
Hello, I want to parse some bit flags from a bit stream. I know I could do that with bit masks, but with nom it seems clearer and the error handling comes for free. It would also improve the ergonomics for parsing binary formats in general in my opinion.
I propose to add a new function
nom::bits::*::bool
that takes exactly one bit from the bitstream and transforms it into a bool. If I can have an opinion if this would be useful, I will implement it myself, document it and open a PR for it, so it is no hustle for you.System Information
1.61.0
7.11
Test case
The text was updated successfully, but these errors were encountered: