{"success":true,"data":{"ext":"cdx","name":"CDX","description":"CDX is the binary ChemDraw exchange format developed by CambridgeSoft and maintained through ChemDraw and related chemistry software from PerkinElmer and its successors. It is used to store and share chemical structures, reactions, annotations, and laboratory drawings in documents and scientific workflows. The format is generally safe, but older or third-party parsers may have compatibility issues, and legacy files may not render correctly in modern applications.","mime":["chemical/x-cdx"],"risk_level":"Safe","signatures":[{"hex":"56 6A 43 44 30 31 30 30","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"41 72 43","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":[],"usage":{"python":"def is_cdx(file_path: str) -> bool:\n    \"\"\"Check if file is a valid CDX by magic bytes.\"\"\"\n    signature = bytes([0x56, 0x6A, 0x43, 0x44, 0x30, 0x31, 0x30, 0x30])\n    with open(file_path, \"rb\") as f:\n        return f.read(8) == signature","node":"function isCDX(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x56, 0x6A, 0x43, 0x44, 0x30, 0x31, 0x30, 0x30]);\n  return buffer.subarray(0, 8).equals(signature);\n}","go":"func IsCDX(data []byte) bool {\n    signature := []byte{0x56, 0x6A, 0x43, 0x44, 0x30, 0x31, 0x30, 0x30}\n    if len(data) < 8 {\n        return false\n    }\n    return bytes.Equal(data[:8], signature)\n}"}}}