{"success":true,"data":{"ext":"bibtex","name":"BIBTEX","description":"BibTeX is a plain-text bibliography database format created by Oren Patashnik for use with TeX and LaTeX, and it is maintained within the broader TeX community. It is used to store citation records for academic writing, reference managers, and publication workflows, especially when generating bibliographies from LaTeX documents. The format is simple and generally safe, though malformed entries can disrupt bibliography generation; it is now largely a standard rather than a legacy format.","mime":["application/x-bibtex-text-file"],"risk_level":"Safe","signatures":[{"hex":"25 20 42 69 62 54 65 58 20 60","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"}]},{"hex":"25 25 25 20 20","offset":73,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"25 20 42 69 62 54 65 58 20 73 74 61 6E 64 61 72 64 20 62 69 62 6C 69 6F 67 72 61 70 68 79 20","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"}]},{"hex":"25 25 25 20 20 40 42 69 62 54 65 58 2D 73 74 79 6C 65 2D 66 69 6C 65 7B","offset":73,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"25","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":["bib"],"usage":{"python":"def is_bibtex(file_path: str) -> bool:\n    \"\"\"Check if file is a valid BIBTEX by magic bytes.\"\"\"\n    signature = bytes([0x25, 0x20, 0x42, 0x69, 0x62, 0x54, 0x65, 0x58, 0x20, 0x60])\n    with open(file_path, \"rb\") as f:\n        return f.read(10) == signature","node":"function isBIBTEX(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x25, 0x20, 0x42, 0x69, 0x62, 0x54, 0x65, 0x58, 0x20, 0x60]);\n  return buffer.subarray(0, 10).equals(signature);\n}","go":"func IsBIBTEX(data []byte) bool {\n    signature := []byte{0x25, 0x20, 0x42, 0x69, 0x62, 0x54, 0x65, 0x58, 0x20, 0x60}\n    if len(data) < 10 {\n        return false\n    }\n    return bytes.Equal(data[:10], signature)\n}"}}}