C++ change bits per block of boost::dynamic_bitset

363 Views Asked by At

I have one file that has a boost::dynamic_butset input. This file stores blocks in chunks of 8 bits. Then, it gets passed into a function in the file which I am allowed to edit. The problem is, I need to store the bits of this bitset into a vector of 16 bit integers instead of 8 bit ones.

I tried this

boost::dynamic_bitset<uint16_t> newInput (input);

But it says there is no matching function call because of the different types. How can I get this original bitset stored in a vector ? The input bitset that I am using is absolutely enormous, so using a for loop to move everything is out of the question.

0

There are 0 best solutions below