PHPackages                             wyrihaximus/react-stream-base64 - 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. wyrihaximus/react-stream-base64

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

wyrihaximus/react-stream-base64
===============================

Base64 stream encoders/decoders for ReactPHP

1.1.0(7y ago)652.2k↓50%1[2 PRs](https://github.com/WyriHaximus/reactphp-stream-base64/pulls)1MITPHPPHP ^7.2CI failing

Since Jul 10Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/WyriHaximus/reactphp-stream-base64)[ Packagist](https://packagist.org/packages/wyrihaximus/react-stream-base64)[ RSS](/packages/wyrihaximus-react-stream-base64/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (8)Used By (1)

On the fly base64 encoder &amp; decoder for [ReactPHP](https://github.com/reactphp/) streams
============================================================================================

[](#on-the-fly-base64-encoder--decoder-for-reactphp-streams)

[![Linux Build Status](https://camo.githubusercontent.com/054d3e8adb09c8109143d13014f1617644a55fe3bd58fc4424769c5c905601ea/68747470733a2f2f7472617669732d63692e6f72672f57797269486178696d75732f72656163747068702d73747265616d2d6261736536342e706e67)](https://travis-ci.org/WyriHaximus/reactphp-stream-base64)[![Latest Stable Version](https://camo.githubusercontent.com/2d76ea0ad603efeccaf9b86d7ea31a67865f811b07f72543dba91db268d03a90/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f72656163742d73747265616d2d6261736536342f762f737461626c652e706e67)](https://packagist.org/packages/WyriHaximus/react-stream-base64)[![Total Downloads](https://camo.githubusercontent.com/c8b06308137197c16a381b63a8179bc03d4f271c4db2a69f966acc0eabaf24a1/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f72656163742d73747265616d2d6261736536342f646f776e6c6f6164732e706e67)](https://packagist.org/packages/WyriHaximus/react-stream-base64/stats)[![Code Coverage](https://camo.githubusercontent.com/ece02fceb87bf22432bd2a86655012ee3973a8d60a0fa06aca20201031fd4c30/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f57797269486178696d75732f72656163747068702d73747265616d2d6261736536342f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/WyriHaximus/reactphp-stream-base64/?branch=master)[![License](https://camo.githubusercontent.com/47813d52768c18ad7b7bcba4dfcc74c4daefaa257a37d4da1ced46783289ea86/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f72656163742d73747265616d2d6261736536342f6c6963656e73652e706e67)](https://packagist.org/packages/wyrihaximus/react-stream-base64)[![PHP 7 ready](https://camo.githubusercontent.com/3c7f10a8bf9ac90dad8ce28ec225e43d287f27a37b6def3aba87f53661d6aac0/687474703a2f2f7068703772656164792e74696d6573706c696e7465722e63682f57797269486178696d75732f72656163747068702d73747265616d2d6261736536342f62616467652e737667)](https://travis-ci.org/WyriHaximus/reactphp-stream-base64)

### Installation

[](#installation)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```
composer require wyrihaximus/react-stream-base64

```

Usage
-----

[](#usage)

All streams in this package are decorators about the stream you want to encode or decode.

Readable stream decode:

```
$streamToDecode = new ThroughStream();
$stream = new ReadableStreamBase64Decode($streamToDecode);
$stream->on('data', function ($data) {
    echo $data; // foo.bar
});
$streamToDecode->write('Zm9vLmJhcg==');
```

Readable stream encode:

```
$streamToEncode = new ThroughStream();
$stream = new ReadableStreamBase64Encode($streamToEncode);
$stream->on('data', function ($data) {
    echo $data; // Zm9vLmJhcg==
});
$streamToEncode->write('foo.bar');
```

Writable stream decode:

```
$streamToDecode = new ThroughStream();
$stream = new WritableStreamBase64Decode($streamToDecode);
$stream->write('Zm9vLmJhcg=='); // Writes foo.bar to $streamToDecode
```

Writable stream encode:

```
$streamToEncode = new ThroughStream();
$stream = new WritableStreamBase64Encode($streamToEncode);
$stream->write('foo.bar'); // Writes Zm9vLmJhcg== to $streamToEncode
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

Copyright 2017 [Cees-Jan Kiewiet](http://wyrihaximus.net/)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance45

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 58% 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 ~270 days

Total

3

Last Release

2685d ago

PHP version history (2 changes)1.0.0PHP ^7.0

1.1.0PHP ^7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147145?v=4)[Cees-Jan Kiewiet](/maintainers/WyriHaximus)[@WyriHaximus](https://github.com/WyriHaximus)

---

Top Contributors

[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (40 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (21 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (2 commits)")

---

Tags

base64hacktoberfestphpphp7reactphpstream

### Embed Badge

![Health badge](/badges/wyrihaximus-react-stream-base64/health.svg)

```
[![Health](https://phpackages.com/badges/wyrihaximus-react-stream-base64/health.svg)](https://phpackages.com/packages/wyrihaximus-react-stream-base64)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k234.7M20.6k](/packages/friendsofphp-php-cs-fixer)[react/react

ReactPHP: Event-driven, non-blocking I/O with PHP.

9.1k3.6M63](/packages/react-react)[react/child-process

Event-driven library for executing child processes with ReactPHP.

34076.1M136](/packages/react-child-process)[llm/mcp-server

PHP SDK for building MCP servers

431.1k](/packages/llm-mcp-server)

PHPackages © 2026

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