https://github.com/thesis-php/byte-order
The library adds methods for reading bytes in different byte order to Reader and Writer.
https://github.com/thesis-php/byte-order
Last synced: 5 months ago
JSON representation
The library adds methods for reading bytes in different byte order to Reader and Writer.
- Host: GitHub
- URL: https://github.com/thesis-php/byte-order
- Owner: thesis-php
- License: mit
- Created: 2025-01-16T06:59:44.000Z (over 1 year ago)
- Default Branch: 0.1.x
- Last Pushed: 2025-01-23T13:14:31.000Z (over 1 year ago)
- Last Synced: 2025-12-29T04:29:57.461Z (5 months ago)
- Language: PHP
- Size: 40 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
# ByteOrder
## Installation
```shell
composer require thesis/byte-order
```
## Basic usage
```php
read($reader->readUint16()),
$reader->readUint32(),
);
}
function writeFrame(WriteTo $writer, Frame $frame): void
{
$writer->writeUint16(\strlen($frame->id));
$writer->write($frame->id);
$writer->writeUint32($frame->attempts);
}
```