SHV
Status
| Field | Value |
|---|---|
| Extension(s) | .shv |
| Common ecosystem | Husqvarna Viking |
| Format family | Legacy machine file |
| Satin Studio status | Researching |
| Open / import | No |
| Export | No |
| Confidence | Medium. |
What it is
SHV is a legacy Husqvarna Viking format associated with older media and possibly multi-design layouts.
Satin Studio direction
Watchlist import format if real user files appear.
Versions and variants
SHV may be more than a flat stitch stream because it can include substantial preview/graphic data and fixed-length stitch sections per color.
File identification notes
Reported structure includes stitch data, a large one-bit graphic of variable size, fixed/magic-number color lookup, x == 0x80 control events, and predefined stitch-data lengths before color switching.
Observed structure notes
- Observed SHV readers skip an 0x56-byte header text area, read a length-prefixed name, design width/height, skip a one-bit graphic region sized as
ceil(height / 2) * width, then read color/stitch-count records. - Each color section has a big-endian 32-bit stitch count, an 8-bit color code, and nine skipped bytes in observed readers. Color changes are inferred when the stitch count for the current color is exhausted.
- Observed stitch controls use
0x80as a marker:0x80 0x03no-op,0x80 0x02leaves jump mode, and0x80 0x01is followed by signed 16-bit big-endian movement and enters jump mode. - Observed SHV color changes are not explicit stitch opcodes; they are inferred from per-color stitch-count sections while reading the shared stitch stream.
Structure sketch
SHV combines metadata, a bitmap-like graphic, per-color stitch counts, and stitch records:
struct ShvFile<'a> {
header_text: [u8; 0x56],
name_len: u8,
name: &'a [u8],
design_width: u8,
design_height: u8,
graphic: &'a [u8], // ceil(height / 2) * width bytes after a short skip
color_count: u8,
color_sections: &'a [ShvColorSection],
records: &'a [ShvRecord],
}
struct ShvColorSection {
stitch_count: u32, // big-endian
color_code: u8,
unknown: [u8; 9],
}
enum ShvRecord {
StitchOrJump { dx: i8, dy: i8 },
NoOp, // 0x80 0x03
EndJumpMode, // 0x80 0x02
LongJump { dx: i16, dy: i16 }, // 0x80 0x01 + signed 16-bit BE x/y
}
What we still need
Legacy files, graphics layout, color lookup behavior, and reader validation.