Skip to main content

Crate record_descriptor

Crate record_descriptor 

Source
Expand description

Public Bitneedle BRD1 descriptor wire-format and decoding primitives.

This crate is the authoritative BRD1 carrier-descriptor wire contract. It describes how the record stream is located and encoded in the PNG carrier. It does not define BRS1 payload-entry semantics, programme-time revolution duration, track timing, GAP timing, or the relationship between payload entries and programme revolutions.

It contains no JSON descriptor segments, no Brotli compatibility envelopes, no base64/hex wire representations, and no record-creation policy.

Structs§

CacheEncryptionContext
CacheEncryptionDescriptor
CacheEncryptionEnvelope
DescriptorPrefix
RecordDescriptor
Decoded BRD1 carrier descriptor.
ResolvedToneSpan
SignedReleaseReference
One blanket signed-release reference covering the release commitment (see record_core::commitment::release_commitment). SHA-256 and Ed25519 are fixed by SIGNED_RELEASE_REFERENCE_VERSION; there is no per-reference algorithm selector.
ToneSpanDescriptor

Enums§

CacheEncryptionAlgorithm
CacheKeyDerivation
ToneOrdering

Constants§

CACHE_ENCRYPTION_AAD_DOMAIN
CACHE_ENCRYPTION_ALGORITHM_XCHACHA20POLY1305
CACHE_ENCRYPTION_DESCRIPTOR_VERSION
CACHE_ENCRYPTION_ENVELOPE_ALGORITHM_XCHACHA20POLY1305
CACHE_ENCRYPTION_ENVELOPE_MAGIC
CACHE_ENCRYPTION_ENVELOPE_VERSION
CACHE_ENCRYPTION_INFO
CACHE_ENCRYPTION_NONCE_DOMAIN
CACHE_ENCRYPTION_NONCE_INFO
CACHE_ENCRYPTION_NONCE_LENGTH
CACHE_ENCRYPTION_RECORD_BINDING_HASH_LENGTH
CACHE_ENCRYPTION_SECRET_LENGTH
CACHE_ENCRYPTION_TAG_LENGTH
CACHE_KEY_DERIVATION_HKDF_SHA256
METADATA_GRAYSCALE_NIBBLE_BASE
PAYLOAD_ENCODING_RGB
PAYLOAD_ENCODING_RGB_CODE
PAYLOAD_ENCODING_TONED_V1
PAYLOAD_ENCODING_TONED_V1_CODE
RECORD_DESCRIPTOR_MAGIC
RECORD_DESCRIPTOR_PREFIX_LENGTH
RECORD_DESCRIPTOR_VERSION
RECORD_PROFILE_LP
RECORD_PROFILE_LP_CODE
RECORD_PROFILE_SINGLE45
RECORD_PROFILE_SINGLE45_CODE
RELEASE_ID_LENGTH
SEGMENT_ARTIST
SEGMENT_ARTWORK_CREDIT
SEGMENT_BSC_POINTER
SEGMENT_CACHE_ENCRYPTION
SEGMENT_CANONICAL_URL
SEGMENT_CATALOG_NUMBER
SEGMENT_COPYRIGHT_HOLDER
SEGMENT_COPYRIGHT_YEAR
SEGMENT_CREATED_AT
SEGMENT_DESCRIPTOR_CRC32
SEGMENT_LABEL
SEGMENT_PAYLOAD_ENCODING
SEGMENT_RECORD_PROFILE
SEGMENT_RELEASE_ID
SEGMENT_SIGNED_RELEASE_REFERENCE
SEGMENT_STREAM_BYTE_LENGTH
SEGMENT_TITLE
SEGMENT_TONED_CARRIER_MAP
SIGNED_RELEASE_REFERENCE_HASH_LENGTH
SIGNED_RELEASE_REFERENCE_MAX_KEY_ID_LENGTH
SIGNED_RELEASE_REFERENCE_SIGNATURE_LENGTH
SIGNED_RELEASE_REFERENCE_VERSION
Fixed by the BRD1 v2 format: release commitments are always SHA-256, signatures are always Ed25519. No per-reference algorithm selector.
TONED_CARRIER_MAP_VERSION
TONED_MAX_BITS_PER_PIXEL
TONED_MAX_SPAN_COUNT
TONED_MIN_BITS_PER_PIXEL
TONED_ORDERING_BASE_PROXIMITY
TONED_ORDERING_CHROMA_PROXIMITY

Functions§

cache_encryption_aad
cache_encryption_record_binding_hash
cache_encryption_record_binding_hash_hex
Hex-encoded record binding hash, exposed so callers (e.g. the JS cache layer, via the wasm bindings) can fold the exact same record-identity notion the encryption itself uses into a pre-decode, record-scoped cache lookup key, without reimplementing the identity hash.
compute_descriptor_crc32
decode_cache_encryption_descriptor
decode_descriptor_prefix
decode_record_descriptor_bytes
decode_signed_release_reference
decode_toned_carrier_map
decrypt_cache_envelope
derive_cache_encryption_key
encode_cache_encryption_descriptor
encode_toned_carrier_map
encrypt_cache_envelope
metadata_byte_capacity_for_pixel_count
metadata_bytes_from_grayscale_rgba
metadata_pixel_count_for_byte_length
payload_encoding_code
payload_encoding_from_code
record_profile_code
record_profile_from_code
release_id_to_bytes
Parse a canonical rel_-tagged ULID string into its 16 raw bytes.
release_id_to_text
Format 16 raw release ULID bytes back into the canonical rel_-tagged display string.
resolve_tone_spans
toned_pixel_count
validate_tone_span