pub enum Op {
EmitObject {
object_id: u32,
},
Inline {
bytes: Vec<u8>,
},
RepeatLast {
count: u32,
},
DecodeChannel {
channel_id: u32,
},
InterleaveChannels {
kinds_channel: u32,
lengths_channel: u32,
first_payload_channel: u32,
payload_channel_count: u8,
},
MarkOffset {
slot: u8,
},
EmitOffset {
slot: u8,
width: u8,
},
PackSegments {
data_object: u32,
items: Vec<PackItem>,
},
PackedChannels {
data_channel: u32,
plan_channel: u32,
declared_output_len: u64,
},
DeflateReplay {
replay_codec: u8,
source_kind: u8,
source_id: u32,
corrections_object: u32,
declared_output_len: u32,
},
}Expand description
A single reconstruction instruction.
Variants§
EmitObject
Emit the exact bytes of the referenced object.
Inline
Emit literal bytes carried inline in the graph record.
RepeatLast
Repeat the byte output of the immediately preceding instruction
count additional times.
DecodeChannel
Emit the decoded bytes of the referenced entropy channel.
InterleaveChannels
Reconstruct bytes by interleaving a contiguous range of per-kind payload
channels. A kind channel holds one kind byte per token; a lengths
channel holds one little-endian u32 per token; payload channel
first_payload_channel + k carries the token spans whose kind is k.
Fields
MarkOffset
Record the current output position (a u64) into the named slot. Emits no
output bytes; the recorded value is available to later Op::EmitOffset
instructions.
Fields
slot: u8Slot index; must be below crate::dra::program::MAX_OFFSET_SLOTS.
EmitOffset
Emit the decimal form of a previously marked output position, left
zero-padded to exactly width bytes.
Fields
slot: u8Slot index marked by an earlier Op::MarkOffset.
PackSegments
Reconstruct output from a compact item table over one data object, amortizing per-segment framing: literal runs copy contiguous data-object bytes, marks record output positions, and emits render marked positions as fixed-width decimals. The data object must be consumed exactly.
Fields
PackedChannels
Reconstruct output from a data entropy channel interpreted by a
serialized item table carried in a plan entropy channel. This lets one
layout plan travel through rANS-coded channels instead of a literal data
object, so the plan and its data pay entropy-coding cost together. The
plan channel holds exactly encode_items of the item table, and the
data channel must be consumed exactly.
Fields
DeflateReplay
Reconstruct the exact original raw DEFLATE bitstream from a plaintext
source plus an opaque correction object, replaying the producer’s DEFLATE
coding decisions. Emits raw DEFLATE (RFC 1951) bytes only; any zlib framing
is composed by surrounding instructions. declared_output_len is the exact
expected raw payload length, validated at evaluation.
The plaintext may come from either the object table (source_kind = DEFLATE_SOURCE_OBJECT) or an entropy channel (source_kind = DEFLATE_SOURCE_CHANNEL); the channel form lets several streams share
one stored plaintext capsule. Reconstruction can panic internally on
hostile correction data, so it is isolated and never panics the decoder
(see crate::codec::deflate).
Fields
replay_codec: u8Replay-codec identity: which exact reconstruction semantics the
corrections blob is bound to. Must be REPLAY_DEFLATE_PREFLATE_0_7_6.
The correction state is an opaque, version-coupled preflate blob; this
tag makes that explicit on the wire so the format can never silently
treat the current preflate internal representation as a stable standard.
source_kind: u8Plaintext source kind (DEFLATE_SOURCE_OBJECT / DEFLATE_SOURCE_CHANNEL).