Documentation
¶
Overview ¶
Package wire defines internal JAB Code wire variants, decoder capability sets and encoder format choices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities uint8
Capabilities is an additive bitmask of decoder variants.
func (Capabilities) Has ¶
func (capabilities Capabilities) Has(v Variant) bool
Has reports whether v is enabled in the decoder capability set.
func (Capabilities) Valid ¶
func (capabilities Capabilities) Valid() bool
Valid reports whether the set is nonempty and contains only known variants.
type Encoding ¶
type Encoding uint8
Encoding identifies one output format. It is deliberately not a decoder capability set: encoding selects exactly one format and performs no probing.
type Variant ¶
type Variant uint8
Variant identifies the wire interpretation of one decoded symbol. CurrentC and PreV2C intentionally remain distinct even where they share PRNG, ECC or message rules because their finder, metadata, palette and secondary layouts differ.
const ( // ISO23634 is the ISO/IEC 23634:2022 target. ISO23634 Variant = iota // ISOHighColor extends the ISO physical family through 256 module colors. ISOHighColor // CurrentC is the current C-reference format under the current finder family. CurrentC // BSI is the BSI TR-03137 format. BSI // PreV2C is the pre-v2.0 C-reference format under the BSI-era finder family. PreV2C )
func (Variant) Mask ¶
func (v Variant) Mask() Capabilities
Mask returns the one-bit decoder capability for v, or zero when v is invalid.
func (Variant) UsesISO23634Base ¶
UsesISO23634Base reports whether the variant uses the ISO palette, PRNG, interleaving, LDPC and message-control rules. ISOHighColor changes only the ISO-reserved color-mode range.