MediaWiki REL1_37
Deflate Class Reference

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. More...

Static Public Member Functions

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

Detailed Description

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Server-side helper for client-side compressed content.

Since
1.32

Definition at line 24 of file Deflate.php.

Member Function Documentation

◆ inflate()

static Deflate::inflate (   $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:

mw.loader.using( 'mediawiki.deflate' ).then( function () {
var deflated = mw.deflate( myContent );
} );
Parameters
string$dataDeflated data
Returns
StatusValue Inflated data will be set as the value
Exceptions
InvalidArgumentExceptionIf the data wasn't deflated

Definition at line 55 of file Deflate.php.

◆ isDeflated()

static Deflate::isDeflated (   $data)
static

Whether the content is deflated.

Parameters
string$data
Returns
bool

Definition at line 33 of file Deflate.php.


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