{"success":true,"data":{"ext":"txt","name":"TXT","description":"The TXT format is a plain text file format used across operating systems and text editors, with conventions standardized through the Internet media type text/plain and maintained by common software implementations. It is used for notes, source code, configuration files, logs, and other unformatted text exchanged between applications. TXT files are generally safe to open, although their contents may be misleading or renamed from other file types, so source verification remains important.","mime":["text/plain"],"risk_level":"Safe","signatures":[{"hex":"EF BB BF","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"FF FE","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}],"endianness":"little"},{"hex":"FE FF","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}],"endianness":"big"},{"hex":"FF FE 00 00","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}],"endianness":"little"},{"hex":"00 00 FE FF","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}],"endianness":"big"},{"hex":"0E FE FF","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":["others"],"usage":{"python":"def is_txt(file_path: str) -> bool:\n    \"\"\"Check if file is a valid TXT by magic bytes.\"\"\"\n    signature = bytes([0xEF, 0xBB, 0xBF])\n    with open(file_path, \"rb\") as f:\n        return f.read(3) == signature","node":"function isTXT(buffer: Buffer): boolean {\n  const signature = Buffer.from([0xEF, 0xBB, 0xBF]);\n  return buffer.subarray(0, 3).equals(signature);\n}","go":"func IsTXT(data []byte) bool {\n    signature := []byte{0xEF, 0xBB, 0xBF}\n    if len(data) < 3 {\n        return false\n    }\n    return bytes.Equal(data[:3], signature)\n}"}}}