PHP » PYTHON |
login |
register |
about
|
PYTHON gzcompress
is this article helpful?
|
Python replacement for PHP's gzcompress
[
edit
| history
]
#Python 2.x: result = data.encode('zlib') #Python 3.x: import zlib result = zlib.compress(data) result = zlib.compress(data, level) gzcompress(PHP 4 >= 4.0.1, PHP 5) gzcompress — Compress a string Description
string gzcompress
( string $data
[, int $level= -1
] )
This function compress the given string using the ZLIB data format. For details on the ZLIB compression algorithm see the document "» ZLIB Compressed Data Format Specification version 3.3" (RFC 1950).
Parameters
Return ValuesThe compressed string or FALSE if an error occurred. Examples
Example #1 gzcompress() example
<?php
See Also
|
more
Recently updated
more
Most requested
|