{"success":true,"data":{"ext":"chm","name":"Microsoft Compiled HTML Help File","description":"Microsoft Compiled HTML Help (CHM) is a proprietary help file format developed by Microsoft for packaging hypertext documentation in a single compressed file. It is used by software applications, online manuals, and technical reference systems, and is typically opened with the Windows HTML Help viewer or compatible third-party tools. The format is legacy in many environments, and CHM files from untrusted sources should be handled cautiously because they can contain active content and embedded links.","mime":["application/vnd.ms-htmlhelp"],"risk_level":"Safe","signatures":[{"hex":"49 54 53 46","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":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"},{"name":"Neil Harvey FileSignatures","url":"https://raw.githubusercontent.com/neilharvey/FileSignatures/master/src/FileSignatures/Formats/CompiledHtmlHelp.cs"}]},{"hex":"49 54 53 46 03 00 00 00","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"60 00 00 00","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":["chi"],"usage":{"python":"def is_chm(file_path: str) -> bool:\n    \"\"\"Check if file is a valid CHM by magic bytes.\"\"\"\n    signature = bytes([0x49, 0x54, 0x53, 0x46])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isCHM(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x49, 0x54, 0x53, 0x46]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsCHM(data []byte) bool {\n    signature := []byte{0x49, 0x54, 0x53, 0x46}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"}}}