Name

deflateSetHeader   - provides gzip header information for when a gzip stream is requested by deflateInit2().
 

Synopsis

int ZEXPORT deflatePrime(z_streamp strm, int bits, int value);

Detailed Description

deflateSetHeader() provides gzip header information for when a gzip stream is requested by deflateInit2(). deflateSetHeader() may be called after deflateInit2() or deflateReset() and before the first call of deflate(). The text, time, os, extra field, name, and comment information in the provided gz_header structure are written to the gzip header (xflag is ignored -- the extra flags are set according to the compression level). The caller must assure that, if not Z_NULL, name and comment are terminated with a zero byte, and that if extra is not Z_NULL, that extra_len bytes are available there. If hcrc is true, a gzip header crc is included. Note that the current versions of the command-line version of gzip (up through version 1.3.x) do not support header crc's, and will report that it is a "multi-part gzip file" and give up.
 

If deflateSetHeader is not used, the default gzip header has text false, the time set to zero, and os set to 3, with no extra, name, or comment fields. The gzip header is returned to the default state by deflateReset().


Parameters

z_streamp strm stream of data
gz_headerp head gzip header
 

Return value

int ZEXPORT deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent.
 

Feedback

For additional information or queries on this page send feedback

© 2008-2009 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user.

Top