Skip to main content

DST

Status

FieldValue
Extension(s).dst
Common ecosystemTajima and broad commercial embroidery workflows
Format familyExpanded stitch stream
Satin Studio statusAvailable for stitch-stream import/export
Open / importYes
ExportYes
ConfidenceHigh for ecosystem role; command details documented.

What it is

DST is one of the oldest and most widely accepted commercial embroidery exchange formats. It is machine-oriented and compact. It usually carries little more than a short label, stitch counts, extents, and three-byte movement commands.

DST does not normally carry thread RGB colors, editable vectors, or thumbnail previews. Color information is usually supplied by human worksheets or sidecar files.

Satin Studio direction

Satin Studio imports DST as preserved manual stitches and exports DST for broad machine handoff. Treat thread colors as worksheet data: core DST stores color stops, not reliable RGB/catalog thread identity.

Versions and variants

DST is often treated as one format, but practical dialects differ in header conventions, trim behavior, sequin use, and optional sidecar/thread metadata.

File identification notes

DST has a 512-byte header followed by fixed three-byte commands. The commonly used header fields are ASCII records padded with spaces:

  • LA: label/design name.
  • ST: stitch/special-record count.
  • CO: color-change count.
  • +X, -X, +Y, -Y: extents.
  • AX, AY: last point relative to start.
  • MX, MY, PD: legacy multi-design/paper-tape fields.

The stitch body is made of 3-byte records. Movement is encoded through weighted bits for ±1, ±3, ±9, ±27, and ±81, with a practical maximum movement of 121 units per record. Control bits distinguish normal stitch, jump, color change/stop, and sequin mode. Some files append a single 0x1a byte after the final record.

Trims are often represented operationally by repeated short jumps rather than by a universal explicit trim command.

Observed structure notes

  • DST movement signs are not stored as ordinary integers. X and Y are reconstructed by summing weighted bits from all three bytes.
  • Observed X weights: byte2 bits 2/3 for +81/-81, byte1 bits 2/3 for +27/-27, byte0 bits 2/3 for +9/-9, byte1 bits 0/1 for +3/-3, and byte0 bits 0/1 for +1/-1.
  • Observed Y weights: byte2 bits 5/4 for +81/-81, byte1 bits 5/4 for +27/-27, byte0 bits 5/4 for +9/-9, byte1 bits 7/6 for +3/-3, and byte0 bits 7/6 for +1/-1; embroidery-coordinate readers often invert final Y.
  • Observed command masks include end when byte2 & 0b11110011 == 0b11110011, color change/stop when byte2 & 0b11000011 == 0b11000011, sequin mode when byte2 & 0b01000011 == 0b01000011, and jump/sequin-eject when byte2 & 0b10000011 == 0b10000011.
  • Observed writers place 0x1A after the ASCII header fields and then pad with spaces through byte 511.
  • Common writer headers emit LA, ST, CO, +X, -X, +Y, -Y, AX, AY, MX, MY, and PD before optional extended fields.
  • Extended DST headers may include AU author, CP copyright, and TC thread-color lines, but these are interoperability aids rather than core DST machine commands.
  • Observed writers represent trim operationally as repeated short jump records rather than a universal explicit DST trim opcode.

Structure sketch

DST has one of the clearest expanded-stream layouts: a 512-byte ASCII header followed by three-byte bit-packed records.

struct DstFile<'a> {
header: [u8; 512], // ASCII fields padded with spaces
records: &'a [DstRecord], // fixed 3-byte records
optional_dos_eof: Option<u8>, // sometimes 0x1A
}

struct DstHeaderFields<'a> {
la_label: Option<&'a [u8]>, // LA field inside the 512-byte header
st_count: Option<&'a [u8]>,
co_count: Option<&'a [u8]>,
extents: Option<&'a [u8]>, // +X, -X, +Y, -Y, AX, AY, MX, MY, PD fields
}

struct DstRecord {
b0: u8,
b1: u8,
b2: u8,
// movement is decoded from weighted bits: ±1, ±3, ±9, ±27, ±81
// control bits classify stitch, jump, stop/color-change, sequin, or end behavior
}

What we still need

More validation covering trims, sequins, optional TC thread-color headers, and independent machine-reader behavior.