[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clarification proposal for Deflate RFC




> > Here are recommended changes to rfc1951 "DEFLATE Compressed Data Format
> > Specification":
> >   returnCode = deflateInit2_(
> >                 &stream,
> >                 Z_DEFAULT_COMPRESSION,
> >                 Z_DEFLATED,
> >                 -WINDOW_SIZE,
> >                 DEF_MEM_LEVEL,
> >                 Z_DEFAULT_STRATEGY,
> >                 ZLIB_VERSION,
> >                 sizeof(z_stream));
> > 
> > 
> >   returnCode = inflateInit2_(
> >                 &stream,
> >                 -WINDOW_SIZE,
> >                 ZLIB_VERSION,
> >                 sizeof(z_stream));

	From what I see in zlib.h, {de,in}flateInit2_() are not really
	externally visible API.  We should be using {de,in}flateInit2()
	(without the last underbar), with the following arguments:

	It should also be noted that DEF_MEM_LEVEL is not declared in zlib.h,
	it seems.

itojun


returnCode = deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
	-WINDOW_SIZE, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);
returnCode = inflateInit2(&stream, -WINDOW_SIZE);


References: