PHPackages                             cyndaron/binary-handler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. cyndaron/binary-handler

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cyndaron/binary-handler
=======================

Read and write binary files easily

v3(2y ago)0668↑117.9%MITPHPPHP &gt;=8.1

Since Mar 21Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/Cyndaron/binary-handler)[ Packagist](https://packagist.org/packages/cyndaron/binary-handler)[ RSS](/packages/cyndaron-binary-handler/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (2)Versions (5)Used By (0)

Binary Handler
==============

[](#binary-handler)

Simple project to read and write binary files in PHP.

Background
----------

[](#background)

The project was created out of a desire to have a solution that was a bit simpler than [mdurrant’s Binary Reader](https://github.com/mdurrant/php-binary-reader), and which supported writing binary files. Some of the differences:

- This project only works on whole bytes. You will have to do any bitmasking yourself.
- This project allows *writing* binary files, in addition to reading them.
- This project allows creating the reader and writer from a filename, in addition to a string or a resource.

Which one is the best fit for your project will depend on your use cases, obviously.

Usage
-----

[](#usage)

Both the BinaryReader and BinaryWriter take a resource. Helper functions are provided to create them from an already existing string or from a filename.

Extending
---------

[](#extending)

The project is set up with extensibility in mind, as it is very well possible you’ll want to be able to read or write structures specific to your file type. You can quite easily build your own reader/writer using the provided traits and interfaces - even the default BinaryReader and BinaryWriter classes are only built using these.

Future plans
------------

[](#future-plans)

- Adding a test suite.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance47

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~89 days

Total

4

Last Release

933d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1478678?v=4)[Michael Steenbeek](/maintainers/Gymnasiast)[@Gymnasiast](https://github.com/Gymnasiast)

---

Top Contributors

[![Gymnasiast](https://avatars.githubusercontent.com/u/1478678?v=4)](https://github.com/Gymnasiast "Gymnasiast (15 commits)")

---

Tags

binary

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/cyndaron-binary-handler/health.svg)

```
[![Health](https://phpackages.com/badges/cyndaron-binary-handler/health.svg)](https://phpackages.com/packages/cyndaron-binary-handler)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
