Spx files are Pfaff machine binary stitch files. As these are saved with .edr files the assumption is they do not themselves store any color information.
All files start with magic numbers 25 73 70 78 25: %spx%
This is very similar to VP3 style format and sectional tagging. Embroidery format VP3
Section tag 01 01 01. 08-0B Following that we have the remaining number of bytes in the file, in a 4 byte big endian number.
We then have in the 01 01 01 block 0x50 characters that typically read:
Section tag 07 01 01.
5F-62 Following that we have the remaining bytes in the file, in a 4 byte big endian number.
We then have a single number:
Section 06 01 01 doesn't contain the distance to the end of the file, but to the end of the current section block. This is usually 00 6D.
Followed by some unchanging data:
Then we have another bunch of unchanging characters:
And we finish out the section with:
Section starts exactly at 0x100
103-106: Following that we have the remaining bytes in the file, in a 4 byte big endian number.
We 4 4-byte big endian numbers conveying some information about size.
00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 00
We then enter section 02 01 01:
This is the stitches section:
To make a reader most everything in the header is pointless. Skip 0x11E characters. Then read sets of 9. In which the 3,4 5,6 and 7 bytes may be relevant.