src/Net/HTTP/Response/Decompressor.php
public static function decompressString( $content, $type = NULL )
	{
		if( !$type )
			return $content;
		ob_start();																					//  open a output buffer
		switch( strtolower( $type ) )
		{
			case 'deflate':
				$content	= self::inflate( $content );
				break;
			case 'gzip':
				xmp( $content );
				$content	= self::ungzip( $content );
				xmp( $content );
				break;
			default:
				ob_end_clean();
				throw new InvalidArgumentException( 'Decompression method "'.$type.'" is not supported' );
		}
		$output		= ob_get_clean();																//  close buffer for PHP error messages
		if( $content === FALSE && $output )															//  could not decompress
			throw new RuntimeException( $output );												//  throw exception and carry error message
		return $content;																				//  return decompressed response Content
	}
public static function decompressString( $content, $type = NULL )
	{
		if( !$type )
			return $content;
		ob_start();																					//  open a output buffer
		switch( strtolower( $type ) )
		{
			case 'deflate':
				$content	= self::inflate( $content );
				break;
			case 'gzip':
				xmp( $content );
				$content	= self::ungzip( $content );
				xmp( $content );
				break;
			default:
				ob_end_clean();
				throw new InvalidArgumentException( 'Decompression method "'.$type.'" is not supported' );
		}
		$output		= ob_get_clean();																//  close buffer for PHP error messages
		if( $content === FALSE && $output )															//  could not decompress
			throw new RuntimeException( $output );												//  throw exception and carry error message
		return $content;																				//  return decompressed response Content
	}
public static function decompressString ( $ content , $ type = NULL ) { if ( ! $ type ) return $ content ; ob_start ( ) ; //  open a output buffer switch ( strtolower ( $ type ) ) { case 'deflate' : $ content = self :: inflate ( $ content ) ; break ; case 'gzip' : xmp ( $ content ) ; $ content = self :: ungzip ( $ content ) ; xmp ( $ content ) ; break ; default : ob_end_clean ( ) ; throw new InvalidArgumentException ( 'Decompression method "' . $ type . '" is not supported' ) ; } $ output = ob_get_clean ( ) ; //  close buffer for PHP error messages if ( $ content === FALSE && $ output ) //  could not decompress throw new RuntimeException ( $ output ) ; //  throw exception and carry error message return $ content ; //  return decompressed response Content }
Decompresses compressed Response Content.
@access		public
@param		string		$content			Response Content, compressed
@param		string		$type				Compression Type used (gzip|deflate)
@return		string
Decompresses compressed Response Content .