Title: WP_Http_Encoding::is_available
Published: April 25, 2014
Last modified: August 20, 2026

---

# WP_Http_Encoding::is_available(): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_http_encoding/is_available/?output_format=md#description)
 * [Return](https://developer.wordpress.org/reference/classes/wp_http_encoding/is_available/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_http_encoding/is_available/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_http_encoding/is_available/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_http_encoding/is_available/?output_format=md#changelog)

Whether decompression and compression are supported by the PHP version.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_http_encoding/is_available/?output_format=md#description)󠁿

Each function is tested instead of checking for the zlib extension, to ensure that
the functions all exist in the PHP version and aren’t disabled.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_http_encoding/is_available/?output_format=md#return)󠁿

 bool

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_http_encoding/is_available/?output_format=md#source)󠁿

    ```php
    public static function is_available() {
    	return ( function_exists( 'gzuncompress' ) || function_exists( 'gzdeflate' ) || function_exists( 'gzinflate' ) );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-http-encoding.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/class-wp-http-encoding.php#L231)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/class-wp-http-encoding.php#L231-L233)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_http_encoding/is_available/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_Http_Encoding::accept_encoding()](https://developer.wordpress.org/reference/classes/wp_http_encoding/accept_encoding/)`wp-includes/class-wp-http-encoding.php` |

What encoding types to accept and their priority values.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_http_encoding/is_available/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.8.0](https://developer.wordpress.org/reference/since/2.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_http_encoding%2Fis_available%2F)
before being able to contribute a note or feedback.