public function EntityBody::compress

If the stream is readable, compress the data in the stream using deflate compression. The uncompressed stream is then closed, and the compressed stream then becomes the wrapped stream.

Parameters

string $filter Compression filter:

Return value

bool Returns TRUE on success or FALSE on failure

Overrides EntityBodyInterface::compress

File

drupal/core/vendor/guzzle/http/Guzzle/Http/EntityBody.php, line 97

Class

EntityBody
Entity body used with an HTTP request or response

Namespace

Guzzle\Http

Code

public function compress($filter = 'zlib.deflate') {
  $result = $this
    ->handleCompression($filter);
  $this->contentEncoding = $result ? $filter : false;
  return $result;
}