public function __construct(WritableStream $stream, int $encoding = null, int $level = 1, array $options = []) { parent::__construct($stream); if (!isset($options['window'])) { $options['window'] = 15; } $this->context = \deflate_init($encoding ?? \ZLIB_ENCODING_GZIP, \array_merge($options, ['level' => $level])); $this->bufferSize = \max(8192, \pow(2, $options['window'])); }
public function __construct(WritableStream $stream, int $encoding = null) { parent::__construct($stream); $this->context = \inflate_init($encoding ?? \ZLIB_ENCODING_GZIP); }