ComponentAce.Compression.Libs.ZLib.Deflate.deflateEnd C# (CSharp) Method

deflateEnd() private method

Finish compression with deflate algorithm
private deflateEnd ( ) : int
return int
        internal int deflateEnd()
        {
            if (status != DeflateState.INIT_STATE && status != DeflateState.BUSY_STATE && status != DeflateState.FINISH_STATE)
            {
                return (int)ZLibResultCode.Z_STREAM_ERROR;
            }
            // Deallocate in reverse order of allocations:
            Pending_buf = null;
            head = null;
            prev = null;
            window = null;

            return status == DeflateState.BUSY_STATE ? (int)ZLibResultCode.Z_DATA_ERROR : (int)ZLibResultCode.Z_OK;
        }