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

Function reverse_bits

lib/core/bytes.h:391–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389};
390
391static inline uint8_t reverse_bits(uint8_t b)
392{
393 b = (b & 0xF0) >> 4 | (b & 0x0F) << 4;
394 b = (b & 0xCC) >> 2 | (b & 0x33) << 2;
395 b = (b & 0xAA) >> 1 | (b & 0x55) << 1;
396 return b;
397}
398
399extern uint8_t toByte(std::vector<bool>::const_iterator start,
400 std::vector<bool>::const_iterator end);

Callers 1

reverseBitsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected