Skip to main content

Bytefield

Bytefield creates byte-oriented protocol diagrams from drawing forms.

Use this type

Use Bytefield for byte layouts, headers, payloads, and protocol documentation.

Source format

The source format is bytefield-svg forms. Enter the source in the diagram.zip editor.

Syntax essentials

  • Put one drawing form on each line.
  • Use draw-box to add a field.
  • Use a property map to set a span.
  • Use gap and bottom forms to complete the layout.

Example

(draw-column-headers)
(draw-box "Type" {:span 2})
(draw-box "Length" {:span 2})
(draw-gap "Payload")
(draw-bottom)
Rendered exampleDrag to pan. Use the wheel or controls to zoom.
100%
This view uses the live diagram.zip renderer.

Limitations

  • diagram.zip returns SVG for this type.

Upstream reference

Bytefield documentation