Exemplo n.º 1
0
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;
    }
}
Exemplo n.º 2
0
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;
    }
}
Exemplo n.º 3
0
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++;
}
Exemplo n.º 4
0
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;
    }
}