Skip to main content

Module transcript

Module transcript 

Source
Expand description

Transcript binary serialization (.brkt format).

A transcript is a serialized Vec<OutputPart> — the append-only log of all output parts produced during story execution. Combined with an .inkb program and optional .inkl locale data, a transcript can be re-rendered in any language without re-executing the story.

§Binary format

Header (16 bytes):
  b"BRKT"           magic (4)
  u16 LE            version = 1 (2)
  u16 LE            reserved (2)
  u32 LE            source_checksum (4)
  u32 LE            content CRC-32 (4)

Body:
  u32 LE            part count
  [Part]*           encoded parts

Structs§

TranscriptData
A decoded transcript: the output parts, the source program’s checksum (to verify compatibility before rendering), and the captured fragments (for re-rendering choice display text and computed substrings).

Enums§

TranscriptError
Errors from transcript serialization/deserialization.

Functions§

read_transcript
Deserialize a transcript from the .brkt binary format.
render_transcript
Re-render a transcript against the given line tables.
write_transcript
Serialize a transcript to the .brkt binary format.