{"success":true,"data":{"ext":"onetoc","name":"ONETOC","description":"ONETOC is a Microsoft OneNote table of contents file format used by Microsoft OneNote to organize notebook structure and section metadata. It is primarily used by OneNote desktop applications to store navigation information for notebooks and related sections. The format is generally safe and lightweight, though it is tied to legacy and current OneNote implementations and is not intended for direct editing by users.","mime":["application/onenote;format=onetoc2"],"risk_level":"Safe","signatures":[{"hex":"43 FF 2F A1","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":["onetoc2"],"usage":{"python":"def is_onetoc(file_path: str) -> bool:\n    \"\"\"Check if file is a valid ONETOC by magic bytes.\"\"\"\n    signature = bytes([0x43, 0xFF, 0x2F, 0xA1])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isONETOC(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x43, 0xFF, 0x2F, 0xA1]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsONETOC(data []byte) bool {\n    signature := []byte{0x43, 0xFF, 0x2F, 0xA1}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"}}}