An open API service indexing awesome lists of open source software.

https://github.com/thesis-php/byte-buffer

The library implements buffered I/O.
https://github.com/thesis-php/byte-buffer

Last synced: 14 days ago
JSON representation

The library implements buffered I/O.

Awesome Lists containing this project

README

          

# Byte Buffer

## Installation

```shell
composer require thesis/byte-buffer
```

## Basic usage

```php
read(10)

$writer = new BufferedWriter(/* an implementation of Thesis\ByteReader\Writer */)
$writer->write('test');

$rw = new BufferedReaderWriter(
/* an implementation of Thesis\ByteReader\Reader or Thesis\ByteReader\Reader&Thesis\ByteReader\Writer */,
/* an implementation of ?Thesis\ByteReader\Writer */,
);

$rw->write('test');
$rw->read(4);
$rw->flush();
```