{"success":true,"data":{"ext":"xar","name":"xar (eXtensible ARchive)","description":"eXtensible ARchive (XAR) is an archive file format developed by Xara Group and used by Xara software to store structured content. It is primarily used for packaging graphics, documents, and related resources within Xara design applications and for exchanging project data between compatible tools. The format is generally safe, but like other archives it may contain embedded files, and older XAR documents may require legacy software for full access.","mime":["application/x-xar"],"risk_level":"Safe","signatures":[{"hex":"78 61 72 21","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"},{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":[],"usage":{"python":"def is_xar(file_path: str) -> bool:\n    \"\"\"Check if file is a valid XAR by magic bytes.\"\"\"\n    signature = bytes([0x78, 0x61, 0x72, 0x21])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isXAR(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x78, 0x61, 0x72, 0x21]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsXAR(data []byte) bool {\n    signature := []byte{0x78, 0x61, 0x72, 0x21}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"}}}