php-dextrin

Binary

Table of Contents

Classes

BinaryError
Error type for malformed `.dxnb` input -- the binary-side analog of `Text\ParseError`.
Decoder
`.dxnb` decoder -- the mirror image of {@see Encoder}. Envelope (`magic` `version` `cbor_item`) checked once at the top; everything below that is a single recursive {@see self::decodeItem()}, keyed on CBOR major type first, then on tag -- matching `dxn/DXN.md` §2.2's table row order.
Encoder
`.dxnb` encoder -- a recursive walk over CBOR's major types plus a fixed tag dispatch table, matching `dxn/DXN.md` §2.2's table row order.
FloatWidth
CBOR's half- and single-precision floats (RFC 8949 §3.3, Appendix D), which `.dxnb` writes when they hold a value exactly -- the smallest representation (DXN.md §2.2, Jan, 2026-10-20). Named for what it chooses, as `Float` is a name PHP keeps for itself.
Tags
Pure constants -- CBOR tag numbers and bit-layout tables, mirroring `dxn/DXN.md` §2.3 verbatim. No behavior beyond the flag<->byte conversions, which exist here (not in the encoder/decoder) as one shared source of truth for the bit layout, used by both directions.
Writer
Low-level CBOR item builders shared by {@see Encoder} -- raw major-type/head construction, kept separate from the DXN-type -dispatch logic there.
On this page

Search results