void flush() { if (!m_open) return; size_t n; if ((n = m_buf.size()) > 0) { m_file.write(m_buf.read(n), n); m_buf.crunch(); } }
/// confirm consuming of n bytes void commit(size_t n) { m_buf.read(n); }