WP_Http_Encoding::compatible_gzinflate

SummerySummery

Decompression of deflated string while staying compatible with the majority of servers.

Syntax

WP_Http_Encoding::compatible_gzinflate( string $gzData )

DescriptionDescription

Certain Servers will return deflated data with headers which PHP’s gzinflate() function cannot handle out of the box. The following function has been created from various snippets on the gzinflate() PHP documentation.

Warning: Magic numbers within. Due to the potential different formats that the compressed data may be returned in, some "magic offsets" are needed to ensure proper decompression takes place. For a simple progmatic way to determine the magic offset in use, see: https://core.trac.wordpress.org/ticket/18273

ParametersParameters

$gzData

(string) (Required) String to decompress.

ReturnReturn

(string|bool) False on failure.

SourceSource

File: wp-includes/class-wp-http-encoding.php


			

ChangelogChangelog

Changelog
Version Description
2.8.1 Introduced.
Scroll to Top