{"success":true,"data":{"ext":"pec","name":"Brother/Babylock/Bernina Home Embroidery file","description":"PEC is a proprietary home embroidery file format associated with Brother, Babylock, and Bernina embroidery systems. It is used to store stitch patterns and design data for importing, editing, and stitching embroidery projects on compatible home machines and software. The format is generally considered safe and is primarily of historical interest within consumer embroidery workflows, though files from untrusted sources should still be opened with standard caution.","mime":[],"risk_level":"Safe","signatures":[{"hex":"23 50 45 43 30 30 30 31 4C 41 3A","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["pcs","pes","dst","hus"],"usage":{"python":"def is_pec(file_path: str) -> bool:\n    \"\"\"Check if file is a valid PEC by magic bytes.\"\"\"\n    signature = bytes([0x23, 0x50, 0x45, 0x43, 0x30, 0x30, 0x30, 0x31, 0x4C, 0x41, 0x3A])\n    with open(file_path, \"rb\") as f:\n        return f.read(11) == signature","node":"function isPEC(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x23, 0x50, 0x45, 0x43, 0x30, 0x30, 0x30, 0x31, 0x4C, 0x41, 0x3A]);\n  return buffer.subarray(0, 11).equals(signature);\n}","go":"func IsPEC(data []byte) bool {\n    signature := []byte{0x23, 0x50, 0x45, 0x43, 0x30, 0x30, 0x30, 0x31, 0x4C, 0x41, 0x3A}\n    if len(data) < 11 {\n        return false\n    }\n    return bytes.Equal(data[:11], signature)\n}"}}}