WordPress at a glance
function is not described

WP_Http_Encoding::compress() public WP 2.8.0

Compress raw string using the deflate format.

Supports the RFC 1951 standard.

{} It's a method of the class: WP_Http_Encoding{}

No Hooks.

Return

String|false. Compressed string on success, false on failure.

Usage

$result = WP_Http_Encoding::compress( $raw, $level, $supports );
$raw(string) (required)
String to compress.
$level(int)
Compression level, 9 is highest.
Default: 9
$supports(string)
not used. When implemented it will choose the right compression based on what the server supports.

Changelog

Since 2.8.0 Introduced.

Code of WP_Http_Encoding::compress() WP 5.7

<?php
public static function compress( $raw, $level = 9, $supports = null ) {
	return gzdeflate( $raw, $level );
}