+ if ( ! $args['decompress'] ) // decompression specifically disabled
+ $compression_enabled = false;
+ elseif ( $args['stream'] ) // disable when streaming to file
+ $compression_enabled = false;
+ elseif ( isset( $args['limit_response_size'] ) ) // If only partial content is being requested, we won't be able to decompress it
+ $compression_enabled = false;
+
+ if ( $compression_enabled ) {
+ if ( function_exists( 'gzinflate' ) )
+ $type[] = 'deflate;q=1.0';
+
+ if ( function_exists( 'gzuncompress' ) )
+ $type[] = 'compress;q=0.5';
+
+ if ( function_exists( 'gzdecode' ) )
+ $type[] = 'gzip;q=0.5';
+ }