PHPackages                             dshepherd/bitstream-iterator - 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. dshepherd/bitstream-iterator

ActiveLibrary

dshepherd/bitstream-iterator
============================

A class for iterating through a stream of bits

v1.0.0(7y ago)08MITPHPPHP ^7.1

Since Jul 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/dshepherd/bitstream-iterator)[ Packagist](https://packagist.org/packages/dshepherd/bitstream-iterator)[ Docs](https://github.com/dshepherd/bitstream-iterator)[ RSS](/packages/dshepherd-bitstream-iterator/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Bitstream Iterator
==================

[](#bitstream-iterator)

---

Installation
------------

[](#installation)

```
composer require dshepherd/bitstream-iterator
```

Usage
-----

[](#usage)

```
$bytes = [0xDE, 0xCA, 0xFB, 0xAD, 0xD0];

$iterator = new BitStreamIterator($bytes);

$message = dechex(bindec(implode('', $iterator->take(20))));
$message .= ' ' . dechex(bindec(implode('', $iterator->take(12))));
$flag = $iterator->take(1);
$options = $iterator->take(3);

printf('Message: %s' . PHP_EOL, $message);
printf('Flag is %s' . PHP_EOL, $flag ? 'set' : 'not set');

for ($x = 0; $x < 4; $x++) {
    printf('Bit %d is %s' . PHP_EOL, $x, ($options & pow($x, 2)) != 0 ? 'set' : 'not set');
}
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

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

Unknown

Total

1

Last Release

2855d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/53923492cff81b379df56141d28ae8c97edd38eb833673963f6a38cfe94a8310?d=identicon)[dshepherd](/maintainers/dshepherd)

---

Top Contributors

[![dan-abc](https://avatars.githubusercontent.com/u/195538?v=4)](https://github.com/dan-abc "dan-abc (1 commits)")

---

Tags

iteratorbitstream

### Embed Badge

![Health badge](/badges/dshepherd-bitstream-iterator/health.svg)

```
[![Health](https://phpackages.com/badges/dshepherd-bitstream-iterator/health.svg)](https://phpackages.com/packages/dshepherd-bitstream-iterator)
```

###  Alternatives

[phpunit/php-file-iterator

FilterIterator implementation that filters files based on a list of suffixes.

7.5k879.3M72](/packages/phpunit-php-file-iterator)[nikic/iter

Iteration primitives using generators

1.1k5.9M38](/packages/nikic-iter)[loophp/collection

A (memory) friendly, easy, lazy and modular collection class.

745663.8k13](/packages/loophp-collection)[athari/yalinqo

YaLinqo, a LINQ-to-objects library for PHP

4561.2M5](/packages/athari-yalinqo)[amphp/pipeline

Asynchronous iterators and operators.

7432.7M34](/packages/amphp-pipeline)[dkrnl/simplexmlreader

Wrapper XMLReader class, for simple SAX-reading(and simple XPath-queries) of huge(testing over 1G file) xml.

112951.5k](/packages/dkrnl-simplexmlreader)

PHPackages © 2026

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