ComponentAce.Compression.Libs.ZLib.ZStream.inflateInit C# (CSharp) Method

inflateInit() public method

This is another version of inflateInit() with an extra parameter. The fields next_in, avail_in must be initialized before by the caller. If next_in is not null and avail_in is large enough (the exact value depends on the compression method), inflateInit(int) determines the compression method from the ZLib header and allocates all data structures accordingly; otherwise the allocation will be deferred to the first call of inflate.
public inflateInit ( int windowBits ) : int
windowBits int The windowBits parameter is the base two logarithm of the maximum window size (the size of the history buffer). /// It should be in the range 8..15 for this version of the library. The default value is 15 if is used instead. /// If a compressed stream with a larger window size is given as input, will return with the error code /// instead of trying to allocate a larger window.
return int
		public int inflateInit(int windowBits)
		{
			_istate = new Inflate();
			return _istate.inflateInit(this, windowBits);
		}
		

Same methods

ZStream::inflateInit ( ) : int

Usage Example

Example #1
0
            private static zlib.ZStream CreateInflateStream(int windowBits)
            {
                var zst    = new zlib.ZStream();
                int result = zst.inflateInit(windowBits);

                if (result != Z_OK)
                {
                    throw MakeError(result, zst.msg);
                }

                return(zst);
            }
All Usage Examples Of ComponentAce.Compression.Libs.ZLib.ZStream::inflateInit