{"success":true,"data":{"ext":"cpi","name":"Sietronics CPI XRD scan","description":"Sietronics CPI is a file format for X-ray diffraction scan data, originally developed and maintained by Sietronics Pty Ltd. It is used to store experimental measurements and metadata for analysis, archival, and exchange in crystallography and materials science software. The format is comparatively simple and generally considered safe, though it is a legacy format that may require specialized software to open.","mime":[],"risk_level":"Safe","signatures":[{"hex":"53 49 45 54 52 4F 4E 49 43 53 20 58 52 44 20 53 43 41 4E","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]},{"hex":"FF 46 4F 4E 54","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":[],"usage":{"python":"def is_cpi(file_path: str) -> bool:\n    \"\"\"Check if file is a valid CPI by magic bytes.\"\"\"\n    signature = bytes([0x53, 0x49, 0x45, 0x54, 0x52, 0x4F, 0x4E, 0x49, 0x43, 0x53, 0x20, 0x58, 0x52, 0x44, 0x20, 0x53, 0x43, 0x41, 0x4E])\n    with open(file_path, \"rb\") as f:\n        return f.read(19) == signature","node":"function isCPI(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x53, 0x49, 0x45, 0x54, 0x52, 0x4F, 0x4E, 0x49, 0x43, 0x53, 0x20, 0x58, 0x52, 0x44, 0x20, 0x53, 0x43, 0x41, 0x4E]);\n  return buffer.subarray(0, 19).equals(signature);\n}","go":"func IsCPI(data []byte) bool {\n    signature := []byte{0x53, 0x49, 0x45, 0x54, 0x52, 0x4F, 0x4E, 0x49, 0x43, 0x53, 0x20, 0x58, 0x52, 0x44, 0x20, 0x53, 0x43, 0x41, 0x4E}\n    if len(data) < 19 {\n        return false\n    }\n    return bytes.Equal(data[:19], signature)\n}"}}}