Pike v8.1 release 6

Method Gz.deflate()->deflate()


Method deflate

string(8bit) deflate(string(8bit)|String.Buffer|System.Memory|Stdio.Buffer data, int|void flush)

Description

This function performs gzip style compression on a string data and returns the packed data. Streaming can be done by calling this function several times and concatenating the returned data.

The optional argument flush should be one of the following:

Gz.NO_FLUSH

Only data that doesn't fit in the internal buffers is returned.

Gz.PARTIAL_FLUSH

All input is packed and returned.

Gz.SYNC_FLUSH

All input is packed and returned.

Gz.FINISH

All input is packed and an 'end of data' marker is appended.

See also

Gz.inflate->inflate()