Compress raw string using the deflate format.
Supports the RFC 1951 standard.
(string) (Required) String to compress.
(int) (Optional) Compression level, 9 is highest.
Default value: 9
(string) (Optional) not used. When implemented it will choose the right compression based on what the server supports.
Default value: null
(string|false) False on failure.
File: wp-includes/class-wp-http-encoding.php
public static function compress( $raw, $level = 9, $supports = null ) { return gzdeflate( $raw, $level ); }
Version | Description |
---|---|
2.8.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_http_encoding/compress