Table of Contents

Binary data glossary

Term Meaning in these guides
Byte Eight bits; shown as two hexadecimal digits, such as 2A
Offset Position measured from the start of the input; the first byte has offset 0
Width Number of bytes a field occupies
Endianness or byte order Order of bytes within a number; little-endian stores the least significant byte first
Padding Unused bytes inserted between fields or at the end to satisfy alignment rules
Packed Fields follow each other without alignment gaps
Layout Text describing field names, types, and placement
Root Named declaration selected as the starting point for an operation
Path A selection such as packet.header.kind or packet.items[1]
Parse Read bytes according to a layout and produce values
Serialize Turn values into bytes according to a layout
Update Replace a field in existing bytes without moving later fields
ABI Application binary interface: a compiler and platform's rules for native data and calls
Span A temporary view over a region of memory
Mapped class A class implementing ICStructMapped<T> - generated by [CStructMapped] or written by hand - that ReadValue<T>, Get<T>, and the write operations map to and from without reflection
Base64 A text encoding of bytes; current browser serialize/update results use Uint8Array instead
Stride Distance in bytes between adjacent array elements, including their tail padding
Virtual address A location in a process address space, distinct from a file offset
Code unit A storage unit of a text encoding; UTF-16 uses 16-bit code units
Discriminator A field identifying which record or union interpretation is meaningful
Cache Retained reusable work, such as a prepared layout, to avoid repeating it
Envelope The outer result object containing success, data, and error information
Round trip Read data and write it back, checking which bytes and values are preserved
ValueTask A lightweight promise of a result that await waits for; already complete when the bytes were in memory
CancellationToken A signal an operation checks for "stop now", created from a CancellationTokenSource (a timer, a shutdown); cancellation is an OperationCanceledException, never a read failure
ReadOnlySequence<byte> Bytes in one or several segments, such as a PipeReader's buffer; one segment is read in place, several through a pooled copy
PipeReader A reader over bytes that arrive in pieces: ReadAsync hands over what has arrived, AdvanceTo reports what was consumed and examined
Record sequence One root struct after another with nothing between them, read one per step by ParseMany or the generated Records
Iterator A method that produces values one at a time as a loop asks for them (IEnumerable<T>, IAsyncEnumerable<T> for await foreach); a record is parsed only when the loop reaches it
ref struct enumerator A stack-only GetEnumerator/MoveNext/Current set that foreach accepts without IEnumerable<T>, so an enumeration over views allocates nothing

Start with binary layout basics to see these ideas applied to six bytes.