{"success":true,"data":{"ext":"xpm","name":"XPM","description":"X PixMap (XPM) is an ASCII-based image file format originally developed for the X Window System and now maintained within the X.Org ecosystem. It is used to store small bitmap images, especially application icons, cursors, and other graphical assets in Unix-like desktop environments. Because it is plain text and widely supported by image toolkits, XPM is generally low risk, though it is now largely a legacy format.","mime":["image/x-xpixmap"],"risk_level":"Safe","signatures":[{"hex":"2F 2A 20 58 50 4D 20 2A","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":[],"usage":{"python":"def is_xpm(file_path: str) -> bool:\n    \"\"\"Check if file is a valid XPM by magic bytes.\"\"\"\n    signature = bytes([0x2F, 0x2A, 0x20, 0x58, 0x50, 0x4D, 0x20, 0x2A])\n    with open(file_path, \"rb\") as f:\n        return f.read(8) == signature","node":"function isXPM(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x2F, 0x2A, 0x20, 0x58, 0x50, 0x4D, 0x20, 0x2A]);\n  return buffer.subarray(0, 8).equals(signature);\n}","go":"func IsXPM(data []byte) bool {\n    signature := []byte{0x2F, 0x2A, 0x20, 0x58, 0x50, 0x4D, 0x20, 0x2A}\n    if len(data) < 8 {\n        return false\n    }\n    return bytes.Equal(data[:8], signature)\n}"},"category":"Images"}}