Uses
Uses | Description |
---|---|
wp-includes/class-requests.php: Requests::compatible_gzinflate() | Decompression of deflated string while staying compatible with the majority of servers. |
Decompress an encoded body
Implements gzip, compress and deflate. Guesses which it is by attempting to decode.
(string) (Required) Compressed data in one of the above formats
(string) Decompressed string
File: wp-includes/class-requests.php
public static function decompress($data) { if (substr($data, 0, 2) !== "\x1f\x8b" && substr($data, 0, 2) !== "\x78\x9c") { // Not actually compressed. Probably cURL ruining this for us. return $data; } if (function_exists('gzdecode') && ($decoded = @gzdecode($data)) !== false) { return $decoded; } elseif (function_exists('gzinflate') && ($decoded = @gzinflate($data)) !== false) { return $decoded; } elseif (($decoded = self::compatible_gzinflate($data)) !== false) { return $decoded; } elseif (function_exists('gzuncompress') && ($decoded = @gzuncompress($data)) !== false) { return $decoded; } return $data; }
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests/decompress