pike.ida.liu.se
Search for
Home > Docs > Pike reference

[Top]
Gz
Gz.deflate

Gz.deflate()->create()


Method create

void Gz.deflate(int(0..9)|void level, int|void strategy, int(8..15) window_size)

Description

If given, level should be a number from 0 to 9 indicating the packing / CPU ratio. Zero means no packing, 2-3 is considered 'fast', 6 is default and higher is considered 'slow' but gives better packing.

This function can also be used to re-initialize a Gz.deflate object so it can be re-used.

If the argument is negative, no headers will be emitted. This is needed to produce ZIP-files, as an example. The negative value is then negated, and handled as a positive value.

strategy , if given, should be one of DEFAULT_STRATEGY, FILTERED or HUFFMAN_ONLY.

window_size defines the size of the LZ77 window from 256 bytes to 32768 bytes, expressed as 2^x.

Module reference for Pike v7.8 release 116, 2008-12-31