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.
- Host: GitHub
- URL: https://github.com/thesis-php/byte-buffer
- Owner: thesis-php
- License: mit
- Created: 2025-01-16T09:40:49.000Z (over 1 year ago)
- Default Branch: 0.1.x
- Last Pushed: 2025-01-23T13:05:10.000Z (over 1 year ago)
- Last Synced: 2026-04-07T15:41:23.565Z (2 months ago)
- Language: PHP
- Size: 33.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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();
```