thesis / byte-buffer
The library implements buffered I/O.
Fund package maintenance!
www.tinkoff.ru/cf/5MqZQas2dk7
0.1.0
2025-01-16 16:14 UTC
Requires
- php: ^8.3
- thesis/byte-reader: ^0.3.1
- thesis/byte-writer: ^0.2.1
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.8.2
- ergebnis/composer-normalize: ^2.45.0
- phpunit/phpunit: ^10.5.40
README
Installation
composer require thesis/byte-buffer
Basic usage
<?php declare(strict_types=1); use Thesis\ByteBuffer\BufferedReader; use Thesis\ByteBuffer\BufferedWriter; use Thesis\ByteBuffer\BufferedReaderWriter; $reader = new BufferedReader(/* an implementation of Thesis\ByteReader\Reader */); $reader->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();