Compucon/Singer embroidery design file
application/octet-stream
Magic Bytes
Offset: 11
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
The Compucon and Singer embroidery design file is a proprietary specification developed by Compucon for use with Singer sewing machine systems. These files contain coordinate-based stitch instructions, color sequences, and pattern metadata used by automated textile equipment to execute complex digital embroidery designs. Now considered a legacy format, it is predominantly associated with older Singer hardware and presents minimal security risk as the structure only accommodates stitch coordinates and machine commands.
Validation Code
How to validate .xxx files in Python
Python
def is_xxx(file_path: str) -> bool:
"""
Check if file is a valid XXX by magic bytes.
Signature offset: 11 bytes
"""
signature = bytes([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])
with open(file_path, "rb") as f:
f.seek(11)
return f.read(24) == signature
How to validate .xxx files in Node.js
Node.js
function isXXX(buffer: Buffer): boolean {
// Signature offset: 11 bytes
const signature = Buffer.from([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);
if (buffer.length < 35) return false;
return buffer.subarray(11, 35).equals(signature);
}
Go
func IsXXX(data []byte) bool {
// Signature offset: 11 bytes
signature := []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
if len(data) < 35 {
return false
}
return bytes.Equal(data[11:35], signature)
}
API Endpoint
GET
/api/v1/xxx
curl https://filesignature.org/api/v1/xxx