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

Allow count to count more than just bits. #305

Open
scott-griffiths opened this issue Dec 21, 2023 · 0 comments
Open

Allow count to count more than just bits. #305

scott-griffiths opened this issue Dec 21, 2023 · 0 comments

Comments

@scott-griffiths
Copy link
Owner

So instead of just counting how many zeros or ones, allow bs.count(x) which is roughly equivalent to len(bs.findall(x)).

There is now a count in bitarray that can be efficiently used. It probably makes sense to allow a bytealigned parameter too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant