Writes up to CHAR_BIT-1 last bits if they have not been written yet and pads them with zeros. This method cannot be made public because once a byte has been flushed there is no going back.
| 113 | // yet and pads them with zeros. This method cannot be made public |
| 114 | // because once a byte has been flushed there is no going back. |
| 115 | void Flush() |
| 116 | { |
| 117 | if (m_bitsWritten % CHAR_BIT != 0) |
| 118 | m_writer.Write(&m_buf, 1); |
| 119 | } |
| 120 | |
| 121 | TWriter & m_writer; |
| 122 | uint8_t m_buf; |