System.IO.Compression.Inflater.InflateVerified C# (CSharp) Méthode

InflateVerified() public méthode

public InflateVerified ( byte bufPtr, int length ) : int
bufPtr byte
length int
Résultat int
        public unsafe int InflateVerified(byte* bufPtr, int length)
        {
            // State is valid; attempt inflation
            try
            {
                int bytesRead;
                if (ReadInflateOutput(bufPtr, length, ZLibNative.FlushCode.NoFlush, out bytesRead) == ZLibNative.ErrorCode.StreamEnd)
                {
                    _finished = true;
                }
                return bytesRead;
            }
            finally
            {
                // Before returning, make sure to release input buffer if necessary:
                if (0 == _zlibStream.AvailIn && _inputBufferHandle.IsAllocated)
                {
                    DeallocateInputBufferHandle();
                }
            }
        }