{"success":true,"data":{"ext":"bib","name":"BIB","description":"BibTeX Bibliography File (BIB) is a plain-text bibliographic database format created by Oren Patashnik for use with the BibTeX tool and maintained through the TeX community. It is used to store references for academic papers, books, theses, and other scholarly documents, typically in conjunction with LaTeX. The format is legacy but remains widely supported; as plain text, it poses little security risk beyond untrusted content in downstream processing.","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":["bibtex"],"usage":{"python":"def is_bib(file_path: str) -> bool:\n    \"\"\"Check if file is a valid BIB 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 isBIB(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 IsBIB(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}"}}}