WP_Http_Encoding::compress
Compress raw string using the deflate format.
Supports the RFC 1951 standard.
Метод класса: WP_Http_Encoding{}
Хуков нет.
Возвращает
string|false. Compressed string on success, false on failure.
Использование
$result = WP_Http_Encoding::compress( $raw, $level, $supports );
- $raw(строка) (обязательный)
- String to compress.
- $level(int)
- Compression level, 9 is highest.
По умолчанию:9 - $supports(строка)
- Optional, not used. When implemented it will choose the right compression based on what the server supports.
По умолчанию:null
Список изменений
| С версии 2.8.0 | Введена. |
Код WP_Http_Encoding::compress() WP Http Encoding::compress WP 7.1.2
public static function compress( $raw, $level = 9, $supports = null ) {
return gzdeflate( $raw, $level );
}