Expand description
ILTP byte codec and stream encodings.
The codec owns raw session prefaces and their offers, canonical item
framing, partial bytes, hard framing caps, and EOF truncation. Below the
item framing, the stream layer applies each direction’s 065 encoding,
selected from the two prefaces of every logical session. Semantic
authority, establishment, round, and control-family validation belong to
core::SessionMachine.
Structs§
- Decode
Progress - Bytes one
StreamDecoder::decodecall took from its input and wrote to its output. - Encode
Progress - Bytes one
StreamEncoder::encodecall took and wrote, and whether its step is complete: all input taken forWrite, everything flushed or ended forFlushandEnd. - Iltp
Codec - Encodes accepted output batches and decodes peer bytes for one connected carrier. Prefaces pass raw; the two prefaces of each logical session select and install both directions’ 065 stream encodings.
- Port
Text - What a preface’s sender wants to talk to:
SEGMENT(/SEGMENT)*, each segment one or more printable ASCII bytes other than/, at mostPORT_MAX_BYTESin total. - Record
Read - A read of
buffer.len()canonical bytes ofrecordatoffset. - Session
Nonce Text - Canonical B64A text for one nonzero 32-byte logical-session nonce.
- Session
Preface - One raw session preface: its sender’s nonce, stream-encoding offers, and optional port.
- Stream
Decoder - Decoder for one direction of one logical session.
- Stream
Encoder - Encoder for one direction of one logical session.
- Stream
Offers - The 065 offers one preface carries, restricted to encodings this build
implements.
identityends both lists implicitly and is never listed.
Enums§
- Decoded
- One decoded event of peer input; see
IltpCodec::decode. - Encode
Mode - The step one
StreamEncoder::encodecall takes. - Iltp
Error - Error returned by the ILTP codec.
- Iltp
Item - One framing input or output from a Lace ILTP byte stream: a raw preface or a labelled item.
- Iltp
Truncation - Listing
Form - The base a listing item applies to (060/061), named by its label.
- Listing
Row - One listing row: a withdrawal or a complete added entry.
- Output
Bytes - The next bytes of accepted output; see
IltpCodec::output_bytes. - Record
Label - What a record item carries.
- Stream
Encoding - One direction’s stream encoding, named by its preface token.
- Stream
Encoding Error
Constants§
- CHANGE_
LINE_ BYTES - A
+ HASHor- HASHchange line with its LF. - DEFAULT_
CHUNK_ BYTES - Bytes per transmitted or received chunk unless a runtime configures more.
- EMPTY_
LISTING_ BYTES - The empty listing rendered as an
::offersitem. - ENCODE_
MIN_ OUTPUT - Output room a flushing
StreamEncoder::encodestep needs: zlib repeats sync-flush markers when a flush ends with no room left. - ITEM_
MAX_ BYTES - Hard cap on one complete ILTP item.
- MIN_
CHUNK_ BYTES - The smallest chunk a codec accepts.
- OFFER_
LINE_ BYTES - A bare
HASHoffer line with its LF. - PORT_
MAX_ BYTES - The longest port: a
Portfield line at 010’s 128-byte bound. - RESPONSE_
FRAMING_ BYTES - The framing of one
::responseitem around its record: the label line and the LF after the record. - ROUND_
END_ BYTES - One
::round-enditem. - SESSION_
PREFACE_ MAX_ BYTES - Hard cap on one session preface, including its terminating empty line.
- STREAM_
ENCODING_ DICTIONARY - Raw preset dictionary priming every fresh compressed encoder and decoder.
Functions§
- canonical_
item_ size - Canonical encoded size of one item, without rendering or copying it.
A control item beyond the item cap is
ItemTooLarge. - entry_
len - Bytes of one offer in an
::offersitem: its hash line and one HT-prefixed line per field occurrence.