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

bitset: add from with length func #92

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

paralin
Copy link
Contributor

@paralin paralin commented Jun 21, 2021

Allowing to reconstruct a bitset from the outputs of Len() and Bytes().

Allowing to reconstruct a bitset from the outputs of Len() and Bytes().

Signed-off-by: Christian Stewart <[email protected]>
@lemire
Copy link
Member

lemire commented Jun 21, 2021

I do not understand the need for this function?

@paralin
Copy link
Contributor Author

paralin commented Jun 21, 2021

I want to store the BitSet as []uint64 (output of Bytes) and Length so that I can reconstruct an identical BitSet later

Not seeing a way to do that with existing APIs, the From will construct one with length == uint(len(buf))*64 which is different from the original Length.

@lemire
Copy link
Member

lemire commented Jun 21, 2021

Why won't From(set) do?

@paralin
Copy link
Contributor Author

paralin commented Jun 21, 2021

From will construct one with length == uint(len(buf))*64 which is different from the original Length.

@lemire
Copy link
Member

lemire commented Jun 21, 2021

Running tests.

@lemire lemire merged commit 04f5e3f into bits-and-blooms:master Mar 4, 2022
@paralin paralin deleted the add-from-with-len branch March 5, 2022 20:02
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.

2 participants