{"success":true,"data":{"ext":"mht","name":"MHT","description":"MHT, or MIME HTML, is a web archive format defined by the IETF for packaging an HTML document and its related resources into a single MIME-based file. It is used by web browsers and email clients to save webpages, reports, and messages for offline viewing or sharing. The format is largely legacy, and files may contain active content or external links, so untrusted archives should be opened with caution.","mime":["multipart/related"],"risk_level":"Safe","signatures":[{"hex":"4D 49 4D 45 2D 56 65 72 73 69 6F 6E 3A 20 31 2E 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"}]}],"related":["mhtml"],"usage":{"python":"def is_mht(file_path: str) -> bool:\n    \"\"\"Check if file is a valid MHT by magic bytes.\"\"\"\n    signature = bytes([0x4D, 0x49, 0x4D, 0x45, 0x2D, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3A, 0x20, 0x31, 0x2E, 0x30])\n    with open(file_path, \"rb\") as f:\n        return f.read(17) == signature","node":"function isMHT(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x4D, 0x49, 0x4D, 0x45, 0x2D, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3A, 0x20, 0x31, 0x2E, 0x30]);\n  return buffer.subarray(0, 17).equals(signature);\n}","go":"func IsMHT(data []byte) bool {\n    signature := []byte{0x4D, 0x49, 0x4D, 0x45, 0x2D, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3A, 0x20, 0x31, 0x2E, 0x30}\n    if len(data) < 17 {\n        return false\n    }\n    return bytes.Equal(data[:17], signature)\n}"}}}