Expand description
The byte-level selector codec, re-exported alongside vs.
The variation-selector byte codec (C2PA 2.4 Appendix A.8).
Maps a byte onto one invisible Unicode variation selector and back. Low
nibble values 0x00..=0x0F use the Variation Selectors block
(U+FE00..U+FE0F); the remaining 0x10..=0xFF use Variation Selectors
Supplement (U+E0100..U+E01EF). The two ranges are contiguous in byte space,
so the mapping is a bijection over all 256 byte values.
This module is the transport alphabet only. The framing that carries a
Manifest Store (magic, version, length, payload) lives in
crate::wrapper, and the content binding in crate::hardbinding.
Functionsยง
- byte_
to_ vs - Map a byte to its variation selector (A.8
byteToVariationSelector). - decode_
run - Decode a leading run of variation selectors from
s, stopping at the first character that is not one. Returns the bytes and the byte offset inswhere the run ended. - encode_
run - Encode
bytesas a bare run of variation selectors, with no marker or frame. - is_vs
- Whether
cis a variation selector usable by this codec. - vs_
to_ byte - Map a variation selector back to its byte, or
Noneifcis not one (A.8variationSelectorToByte).