{"success":true,"data":{"ext":"hfa","name":"HFA","description":"HFA (Hierarchical File Architecture) is a geospatial raster file format developed by ERDAS and maintained by Hexagon Geospatial. It is used in ERDAS IMAGINE and related GIS and remote-sensing applications for storing imagery, map layers, and associated metadata. The format is generally considered safe to open, though as with any complex data file, parsing flaws in older software can pose risks; it is primarily a legacy format in modern workflows.","mime":["application/x-erdas-hfa"],"risk_level":"Safe","signatures":[{"hex":"45 48 46 41 5F 48 45 41 44 45 52 5F 54 41 47","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"}]}],"related":[],"usage":{"python":"def is_hfa(file_path: str) -> bool:\n    \"\"\"Check if file is a valid HFA by magic bytes.\"\"\"\n    signature = bytes([0x45, 0x48, 0x46, 0x41, 0x5F, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5F, 0x54, 0x41, 0x47])\n    with open(file_path, \"rb\") as f:\n        return f.read(15) == signature","node":"function isHFA(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x45, 0x48, 0x46, 0x41, 0x5F, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5F, 0x54, 0x41, 0x47]);\n  return buffer.subarray(0, 15).equals(signature);\n}","go":"func IsHFA(data []byte) bool {\n    signature := []byte{0x45, 0x48, 0x46, 0x41, 0x5F, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5F, 0x54, 0x41, 0x47}\n    if len(data) < 15 {\n        return false\n    }\n    return bytes.Equal(data[:15], signature)\n}"}}}