mw.deflateAsync( html ) ); * @endcode * * @param string $data Deflated data * @return StatusValue Inflated data will be set as the value * @throws InvalidArgumentException If the data wasn't deflated */ public static function inflate( string $data ): StatusValue { if ( !self::isDeflated( $data ) ) { throw new InvalidArgumentException( 'Data does not begin with deflated prefix' ); } $deflated = base64_decode( substr( $data, 11 ), true ); if ( $deflated === false ) { return StatusValue::newFatal( 'deflate-invaliddeflate' ); } // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged $inflated = @gzinflate( $deflated ); if ( $inflated === false ) { return StatusValue::newFatal( 'deflate-invaliddeflate' ); } return StatusValue::newGood( $inflated ); } }