wire

package
v0.0.0-...-b4425be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 0 Imported by: 0

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.

const (
	EncodeISO23634 Encoding = iota
	EncodeISOHighColor
	EncodeCurrentC
	EncodeBSI
)

func (Encoding) Valid

func (e Encoding) Valid() bool

Valid reports whether e names one encoder output format.

func (Encoding) Variant

func (e Encoding) Variant() Variant

Variant returns the decoder variant whose wire rules define e.

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

func (v Variant) UsesISO23634Base() bool

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.

func (Variant) Valid

func (v Variant) Valid() bool

Valid reports whether v names one decoder wire variant.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL