PHPackages                             chawuciren/bytebuffer - 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. chawuciren/bytebuffer

ActiveLibrary

chawuciren/bytebuffer
=====================

Handle binary data in a modern and minimalist way

1.0.2(6y ago)049MITPHPPHP &gt;=5.3

Since Jun 28Pushed 6y agoCompare

[ Source](https://github.com/chawuciren/php-bytebuffer)[ Packagist](https://packagist.org/packages/chawuciren/bytebuffer)[ RSS](/packages/chawuciren-bytebuffer/feed)WikiDiscussions master Synced 3d ago

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

### php-bytebuffer

[](#php-bytebuffer)

[![release](https://camo.githubusercontent.com/9547c4acc9ba1c21cf9a427f83cf00caf41fbc2bbc71f59911ef11aa2b7f7635/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656c656173652d312e302e312d677265656e2e737667)](https://camo.githubusercontent.com/9547c4acc9ba1c21cf9a427f83cf00caf41fbc2bbc71f59911ef11aa2b7f7635/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656c656173652d312e302e312d677265656e2e737667) [![php](https://camo.githubusercontent.com/2aab165c98b3e8455f5de3be7f655753884e205278c1a7511aefcc40a7e25057/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d352e332d677265656e2e737667)](https://camo.githubusercontent.com/2aab165c98b3e8455f5de3be7f655753884e205278c1a7511aefcc40a7e25057/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d352e332d677265656e2e737667) [![downloads](https://camo.githubusercontent.com/104e00810890afa4993a177108ca0c231a919bbe20859373df12285b7ce81991/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f776e6c6f6164732d322e32396b2d677265656e2e737667)](https://camo.githubusercontent.com/104e00810890afa4993a177108ca0c231a919bbe20859373df12285b7ce81991/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f776e6c6f6164732d322e32396b2d677265656e2e737667)

关于
--

[](#关于)

使用现代并且简约的方式来处理二进制数据

安装方式
----

[](#安装方式)

开始安装：

#### 1.安装方式一，通过composer 安装

[](#1安装方式一通过composer-安装)

```
composer require chawuciren/bignumber

```

#### 2.安装方式二，直接下载并 include

[](#2安装方式二直接下载并-include)

直接下载源码，引入 src/ByteBuffer.php

开始使用
----

[](#开始使用)

初始化中传入的数值应使用字符串，譬如有一个取出数值并计算后返回给前端的接口，数据库中存储的类型为 decimal 时，应优先将取出的值初始化为 BigNumber，然后在代码中使用 BigNumber 进行计算，后在接口返回处使用：value() 方法获取字符串型的数值输出

#### 1.方式一：使用 new 语句

[](#1方式一使用-new-语句)

```
use \chawuciren\ByteBuffer;

$buffer = new ByteBuffer('BufferString');

```

#### 2.方式二：使用静态方法 build

[](#2方式二使用静态方法-build)

```
use \chawuciren\ByteBuffer;
$number = ByteBuffer::from('BufferString');

```

#### 3.方式三：使用 fill 方法赋值

[](#3方式三使用-fill-方法赋值)

```
$number = new \chawuciren\BigNumber(10);
$number->fill('BufferString');

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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 ~32 days

Total

2

Last Release

2480d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b39e46b3ee821ef82417396f59001bee5c954599efb1397e63bfcbf546014f91?d=identicon)[chawuciren](/maintainers/chawuciren)

---

Top Contributors

[![chawuciren](https://avatars.githubusercontent.com/u/4428282?v=4)](https://github.com/chawuciren "chawuciren (36 commits)")

### Embed Badge

![Health badge](/badges/chawuciren-bytebuffer/health.svg)

```
[![Health](https://phpackages.com/badges/chawuciren-bytebuffer/health.svg)](https://phpackages.com/packages/chawuciren-bytebuffer)
```

PHPackages © 2026

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