MediaWiki master
Wikimedia\Deflate Class Reference

Server-side helper for client-side compressed content. More...

Static Public Member Functions

static inflate (string $data)
 For content that has been compressed with deflate in the client, try to uncompress it with inflate.
 
static isDeflated (string $data)
 Whether the content is deflated.
 

Detailed Description

Server-side helper for client-side compressed content.

Since
1.32

Definition at line 16 of file Deflate.php.

Member Function Documentation

◆ inflate()

static Wikimedia\Deflate::inflate ( string $data)
static

For content that has been compressed with deflate in the client, try to uncompress it with inflate.

If data is not prefixed with 'rawdeflate,' it will be returned unmodified.

Data can be compressed in the client using the 'mediawiki.deflate' module:

return mw.loader.using( 'mediawiki.deflate' ).then( () => mw.deflateAsync( html ) );
Parameters
string$dataDeflated data
Returns
StatusValue<string> Inflated data will be set as the value
Exceptions
InvalidArgumentExceptionIf the data wasn't deflated

Definition at line 45 of file Deflate.php.

◆ isDeflated()

static Wikimedia\Deflate::isDeflated ( string $data)
static

Whether the content is deflated.

Parameters
string$data
Returns
bool

Definition at line 25 of file Deflate.php.


The documentation for this class was generated from the following file: