MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / toBits

Method toBits

lib/core/bytes.cc:210–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210std::vector<bool> Bytes::toBits() const
211{
212 std::vector<bool> bits;
213 for (uint8_t byte : *this)
214 {
215 for (int i = 0; i < 8; i++)
216 {
217 bits.push_back(byte & 0x80);
218 byte <<= 1;
219 }
220 }
221 return bits;
222}
223
224Bytes Bytes::reverseBits() const
225{

Callers 4

decodeUint16Function · 0.80
decodeUint16Function · 0.80
mountMethod · 0.80
test_tobitsFunction · 0.80

Calls 1

push_backMethod · 0.45

Tested by 1

test_tobitsFunction · 0.64