This commit is contained in:
2021-02-26 00:59:52 +03:00
committed by GitHub
parent 9cefa847a9
commit e670cb161c
54 changed files with 1410 additions and 1280 deletions

38
src/Stream/GzipStream.php Normal file
View File

@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
namespace Nsq\Stream;
use Amp\Promise;
use Nsq\Exception\NsqException;
use Nsq\Stream;
class GzipStream implements Stream
{
public function __construct(private Stream $stream)
{
throw new NsqException('GzipStream not implemented yet.');
}
/**
* {@inheritdoc}
*/
public function read(): Promise
{
return $this->stream->read();
}
/**
* {@inheritdoc}
*/
public function write(string $data): Promise
{
return $this->stream->write($data);
}
public function close(): void
{
$this->stream->close();
}
}