| 208 | } |
| 209 | |
| 210 | std::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 | |
| 224 | Bytes Bytes::reverseBits() const |
| 225 | { |