Oihana PHP Enums

ContentEncoding uses ConstantsTrait

Enumeration of HTTP content codings.

These are the values carried by the Content-Encoding, Accept-Encoding and Transfer-Encoding headers (RFC 9110 §8.4.1), as registered in the IANA HTTP Content Coding Registry.

Example:

$response->withHeader( HttpHeader::CONTENT_ENCODING , ContentEncoding::GZIP ) ;
Tags
see
HttpHeader::CONTENT_ENCODING
HttpHeader::ACCEPT_ENCODING
https://www.iana.org/assignments/http-parameters/http-parameters.xhtml#content-coding
author

Marc Alcaraz (ekameleon)

since
1.1.0

Table of Contents

Constants

BR  : string = 'br'
`br` — Brotli coding (RFC 7932).
COMPRESS  : string = 'compress'
`compress` — LZW coding (UNIX `compress`). Rarely used today.
DEFLATE  : string = 'deflate'
`deflate` — zlib data format (RFC 1950 / RFC 1951).
GZIP  : string = 'gzip'
`gzip` — LZ77 with a 32-bit CRC, the Lempel-Ziv coding (RFC 1952).
IDENTITY  : string = 'identity'
`identity` — No transformation; only meaningful in `Accept-Encoding`.
ZSTD  : string = 'zstd'
`zstd` — Zstandard coding (RFC 8878).

Constants

COMPRESS

`compress` — LZW coding (UNIX `compress`). Rarely used today.

public string COMPRESS = 'compress'

DEFLATE

`deflate` — zlib data format (RFC 1950 / RFC 1951).

public string DEFLATE = 'deflate'

GZIP

`gzip` — LZ77 with a 32-bit CRC, the Lempel-Ziv coding (RFC 1952).

public string GZIP = 'gzip'

IDENTITY

`identity` — No transformation; only meaningful in `Accept-Encoding`.

public string IDENTITY = 'identity'

ZSTD

`zstd` — Zstandard coding (RFC 8878).

public string ZSTD = 'zstd'
On this page

Search results