| 256 | } |
| 257 | |
| 258 | Bytes toBytes(std::vector<bool>::const_iterator start, |
| 259 | std::vector<bool>::const_iterator end) |
| 260 | { |
| 261 | Bytes bytes; |
| 262 | ByteWriter bw(bytes); |
| 263 | |
| 264 | BitWriter bitw(bw); |
| 265 | while (start != end) |
| 266 | bitw.push(*start++, 1); |
| 267 | bitw.flush(); |
| 268 | |
| 269 | return bytes; |
| 270 | } |
| 271 | |
| 272 | Bytes Bytes::swab() const |
| 273 | { |