{"success":true,"data":{"ext":"tdef","name":"TDEF","description":"Telegram Desktop Encrypted File (TDEF) is a file format used by Telegram Desktop, maintained by Telegram Messenger LLP, for storing encrypted application data. It is primarily used to preserve local session information, cached content, and other client-side data for the desktop application. The format is intended for internal use and should be handled cautiously, as deleting or modifying these files can disrupt Telegram Desktop settings or access to stored data.","mime":[],"risk_level":"Safe","signatures":[{"hex":"54 44 45 46","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":[],"usage":{"python":"def is_tdef(file_path: str) -> bool:\n    \"\"\"Check if file is a valid TDEF by magic bytes.\"\"\"\n    signature = bytes([0x54, 0x44, 0x45, 0x46])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isTDEF(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x54, 0x44, 0x45, 0x46]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsTDEF(data []byte) bool {\n    signature := []byte{0x54, 0x44, 0x45, 0x46}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"}}}