56 if ( !self::isDeflated( $data ) ) {
57 throw new InvalidArgumentException(
'Data does not begin with deflated prefix' );
59 $deflated = base64_decode( substr( $data, 11 ),
true );
60 if ( $deflated ===
false ) {
61 return StatusValue::newFatal(
'deflate-invaliddeflate' );
63 Wikimedia\suppressWarnings();
64 $inflated = gzinflate( $deflated );
65 Wikimedia\restoreWarnings();
66 if ( $inflated ===
false ) {
67 return StatusValue::newFatal(
'deflate-invaliddeflate' );
69 return StatusValue::newGood( $inflated );