Open DanielHeath opened 5 years ago
@DanielHeath Hi there - apologies for the late reply. In case you're still interested I'm more than happy to accept a PR :)
I ended up writing my own pure-ruby bitfield, which turned out to be easy to serialize and faster for my use case.
The trick was to use a ruby string with the ASCII encoding for the buffer; this made bit-twiddling easy, since you can use chr
/ ord
to get the numbers.
As of https://github.com/boostorg/dynamic_bitset/commit/d644c83b137b5eae5aa0d5b350d2861c19b45f63, dynamic_bitset supports the serialize interface.
It'd be really handy to be able to serialize / deserialize large bitsets (eg to save a computed bloom filter).
Would a PR be accepted? I'm willing to give it a go, but I've forgotten most of the C++ I've learned.