src/Net/HTTP/Response/Compressor.php
public static function compressString( $content, $type = NULL )
	{
		switch( $type )
		{
			case NULL:
				return $content;
			case 'deflate':
				return gzdeflate( $content );														//  compress Content
			case 'gzip':
				return gzencode( $content, 9 );														//  compress Content
			default:																				//  no valid Compression Method set
				throw new InvalidArgumentException( 'Compression "'.$type.'" is not supported' );
		}
	}
public static function compressString( $content, $type = NULL )
	{
		switch( $type )
		{
			case NULL:
				return $content;
			case 'deflate':
				return gzdeflate( $content );														//  compress Content
			case 'gzip':
				return gzencode( $content, 9 );														//  compress Content
			default:																				//  no valid Compression Method set
				throw new InvalidArgumentException( 'Compression "'.$type.'" is not supported' );
		}
	}
public static function compressString ( $ content , $ type = NULL ) { switch ( $ type ) { case NULL : return $ content ; case 'deflate' : return gzdeflate ( $ content ) ; //  compress Content case 'gzip' : return gzencode ( $ content , 9 ) ; //  compress Content default : //  no valid Compression Method set throw new InvalidArgumentException ( 'Compression "' . $ type . '" is not supported' ) ; } }
Applied HTTP Compression to a String.
@access		public
@param		string		$content		String to be compressed
@return		string		Compressed String.
Applied HTTP Compression to a String .