write all non-yet-written bits, fill gaps with 1s (that's a strange JPEG thing)
| 147 | |
| 148 | // write all non-yet-written bits, fill gaps with 1s (that's a strange JPEG thing) |
| 149 | void flush() |
| 150 | { |
| 151 | // at most seven set bits needed to "fill" the last byte: 0x7F = binary 0111 1111 |
| 152 | *this << BitCode(0x7F, 7); // I should set buffer.numBits = 0 but since there are no single bits written after flush() I can safely ignore it |
| 153 | } |
| 154 | |
| 155 | // NOTE: all the following BitWriter functions IGNORE the BitBuffer and write straight to output ! |
| 156 | // write a single byte |
no test coverage detected