Home > PHP > Function > Zlib > gzdeflate()

gzdeflate()

gzdeflate - Deflate a string

Syntax

string gzdeflate (string $data, int $level)

Arguments

  • data - The data to deflate.
  • level - The level of compression. Can be given as 0 for no compression up to 9 for maximum compression. If not given, the default compression level will be the default compression level of the zlib library.

Description

This function compress the given string using the DEFLATEdata format.

Version

PHP 4.0.4, 5

Return value

The deflated string or FALSE if an error occurred.