MCPcopy Create free account
hub / github.com/comaps/comaps / Flush

Method Flush

libs/coding/bit_streams.hpp:115–119  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected