internal int End()
{
if (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE)
{
return ZlibConstants.Z_STREAM_ERROR;
}
// Deallocate in reverse order of allocations:
pending = null;
head = null;
prev = null;
window = null;
// free
// dstate=null;
return status == BUSY_STATE ? ZlibConstants.Z_DATA_ERROR : ZlibConstants.Z_OK;
}
/// <summary> /// End a deflation session. /// </summary> /// <remarks> /// Call this after making a series of one or more calls to Deflate(). All buffers are flushed. /// </remarks> /// <returns>Z_OK if all goes well.</returns> public int EndDeflate() { if (dstate == null) { throw new ZlibException("No Deflate State!"); } int ret = dstate.End(); dstate = null; return(ret); }