{"success":true,"data":{"ext":"hqx","name":"Macintosh BinHex 4 Compressed Archive","description":"Macintosh BinHex 4 is a text-encoded archive format originally developed for classic Mac OS by Apple. It was used to transfer files while preserving resource forks, metadata, and compression across non-Mac systems, and can be opened by legacy archivers and decoders. The format is now largely obsolete; files are generally safe, though contents from untrusted sources should still be inspected.","mime":["application/mac-binhex40"],"risk_level":"Safe","signatures":[{"hex":"6D 75 73 74 20 62 65 20 63 6F 6E 76 65 72 74 65 64 20 77 69 74 68 20 42 69 6E 48 65 78","offset":11,"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":"28 54 68 69 73 20 66 69 6C 65 20 6D 75 73 74 20 62 65 20 63 6F 6E 76 65 72 74 65 64 20 77 69 74 68 20 42 69 6E 48 65 78 20","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":[],"usage":{"python":"def is_hqx(file_path: str) -> bool:\n    \"\"\"Check if file is a valid HQX by magic bytes at offset 11.\"\"\"\n    signature = bytes([0x6D, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6F, 0x6E, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x42, 0x69, 0x6E, 0x48, 0x65, 0x78])\n    with open(file_path, \"rb\") as f:\n        f.seek(11)\n        return f.read(29) == signature","node":"function isHQX(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x6D, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6F, 0x6E, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x42, 0x69, 0x6E, 0x48, 0x65, 0x78]);\n  if (buffer.length < 40) return false;\n  return buffer.subarray(11, 40).equals(signature);\n}","go":"func IsHQX(data []byte) bool {\n    signature := []byte{0x6D, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6F, 0x6E, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x42, 0x69, 0x6E, 0x48, 0x65, 0x78}\n    if len(data) < 40 {\n        return false\n    }\n    return bytes.Equal(data[11:40], signature)\n}"}}}