Which one of the following functions can be used to compress a string?
A
zip_compress()
B
zip()
C
compress()
D
gzcompress()
Correct Answer: gzcompress()
The function gzcompress() compresses the string using the ZLIB data format. One can achieve upto 50% size reduction using this function. The gzuncompress() function is used to uncompress the string.