PHPackages                             firehed/cbor - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. firehed/cbor

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

firehed/cbor
============

CBOR decoder

0.1.0(7y ago)128.0k↓25%1[1 PRs](https://github.com/Firehed/cbor-php/pulls)3MITPHP

Since May 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Firehed/cbor-php)[ Packagist](https://packagist.org/packages/firehed/cbor)[ Docs](https://github.com/Firehed/CBOR)[ RSS](/packages/firehed-cbor/feed)WikiDiscussions master Synced 1mo ago

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

CBOR-PHP
========

[](#cbor-php)

Tools for working with the [CBOR](https://tools.ietf.org/html/rfc7049) data format in PHP

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

[](#installation)

`composer require firehed/cbor`

Usage
-----

[](#usage)

Note: Only decoding is supporing at this time

### Decoding

[](#decoding)

```
$decoder = new Firehed\CBOR\Decoder();

$binaryString = "\x18\x64"; // CBOR for int(100)
$data = $decoder->decode($binaryString);

// OR
$byteArray = [24, 100];
$data = $decoder->decodeArrayOfBytes($byteArray);
```

There is currently very limited support for [tagged types](https://tools.ietf.org/html/rfc7049#section-2.4). When an unsupported tag is encountered, an `OutOfBoundsException` will be thrown.

Tagged type support
-------------------

[](#tagged-type-support)

- 0 DateTime as string
- 1 DateTime as epoch
- 2 Positive Bignum (returns as string, requires `bcmath`)
- 3 Negative Bignum (same)
- 4 Decimal fraction
- 5 Bigfloat
- 21 base64url string
- 22 base64 string
- 23 base16 string
- 24 CBOR
- 32 URI
- 33 base64url
- 34 base64
- 35 regexp
- 36 MIME message
- 55799 Self-describing CBOR

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity49

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

2562d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/354842?v=4)[Eric Stern](/maintainers/Firehed)[@Firehed](https://github.com/Firehed)

---

Top Contributors

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

---

Tags

cbor

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/firehed-cbor/health.svg)

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

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[meyfa/php-svg

Read, edit, write, and render SVG files with PHP

54613.9M42](/packages/meyfa-php-svg)

PHPackages © 2026

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