void Inflator::FlushOutput() { if (m_state != PRE_STREAM) { assert(m_current >= m_lastFlush); ProcessDecompressedData(m_window + m_lastFlush, m_current - m_lastFlush); m_lastFlush = m_current; } }
void Inflator::OutputByte(byte b) { m_window[m_current++] = b; if (m_current == m_window.size()) { ProcessDecompressedData(m_window + m_lastFlush, m_window.size() - m_lastFlush); m_lastFlush = 0; m_current = 0; m_wrappedAround = true; } }
inline void Inflator::OutputByte(byte b) { m_window[m_current++] = b; if (m_current == m_window.size) { ProcessDecompressedData(m_window + m_lastFlush, m_window.size - m_lastFlush); m_lastFlush = 0; m_current = 0; } if (m_maxDistance < m_window.size) m_maxDistance++; }
void Inflator::OutputString(const byte *string, size_t length) { while (length) { size_t len = UnsignedMin(length, m_window.size() - m_current); memcpy(m_window + m_current, string, len); m_current += len; if (m_current == m_window.size()) { ProcessDecompressedData(m_window + m_lastFlush, m_window.size() - m_lastFlush); m_lastFlush = 0; m_current = 0; m_wrappedAround = true; } string += len; length -= len; } }