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

Fix comment for bit list explanation #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mitmotw
Copy link

@mitmotw mitmotw commented Aug 7, 2023

As far as I understood based on the other functions like BitAt or SetBitAt,
9th bit (with index 8) is the right most bit in the 2nd byte.

So in below byte array,
byte{0b00011000, 0b00000010}

this byte array indicates bitlist with 9 bits and
the rightmost bit in the 2nd byte is the final bit with index 8 like below.
bits=[0,0,0,1,1,0,0,0,0]

@CLAassistant
Copy link

CLAassistant commented Aug 7, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@prestonvanloon prestonvanloon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. This looks good to me.

Tested here: https://go.dev/play/p/ijzr7bz8QBs

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

Successfully merging this pull request may close these issues.

3 participants