Base is not public so it's not very convenient to directly map a chunk of data, like a string, that is already the bitfield we want:
bitField = newBitVector[uint](strBitField.len*8)
copyMem(bitField.Base[0].addr, strBitField[0].unsafeAddr, strBitField.len)
That, or make helper procs to init bitfield from most common sequential data structures. But still I see no harm in making Base public so people can do whatever they want to it.
BitVector/src/bitvector.nim
Line 48 in cd8af9d
Base is not public so it's not very convenient to directly map a chunk of data, like a string, that is already the bitfield we want:
That, or make helper procs to init bitfield from most common sequential data structures. But still I see no harm in making Base public so people can do whatever they want to it.