Org.BouncyCastle.Utilities.Zlib.ZStream.inflate C# (CSharp) Method

inflate() public method

public inflate ( int f ) : int
f int
return int
        public int inflate(int f){
            if(istate==null) return Z_STREAM_ERROR;
            return istate.inflate(this, f);
        }
        public int inflateEnd(){

Usage Example

Ejemplo n.º 1
0
        public virtual void Finish()
        {
            do
            {
                z.next_out       = buf;
                z.next_out_index = 0;
                z.avail_out      = buf.Length;

                int err = compress
                                        ?       z.deflate(JZlib.Z_FINISH)
                                        :       z.inflate(JZlib.Z_FINISH);

                if (err != JZlib.Z_STREAM_END && err != JZlib.Z_OK)
                {
                    // TODO
//					throw new ZStreamException((compress?"de":"in")+"flating: "+z.msg);
                    throw new IOException((compress ? "de" : "in") + "flating: " + z.msg);
                }

                int count = buf.Length - z.avail_out;
                if (count > 0)
                {
                    output.Write(buf, 0, count);
                }
            }while (z.avail_in > 0 || z.avail_out == 0);

            Flush();
        }
All Usage Examples Of Org.BouncyCastle.Utilities.Zlib.ZStream::inflate