{"success":true,"data":{"ext":"djvu","name":"DJVU","description":"DJVU is a document and image file format developed by AT&T Labs and later published as an open specification for scanned documents and text-heavy pages. It is commonly used for digitized books, magazines, and archival materials, especially where compact storage and page-based viewing are important. The format is generally considered safe to open, though, like other complex document formats, files from untrusted sources should be handled with up-to-date viewers.","mime":["image/vnd.djvu"],"risk_level":"Safe","signatures":[{"hex":"41 54 26 54 46 4F 52 4D","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"},{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"44 4A 56","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":["djv","eps","epub","lit","mobi","oxps"],"usage":{"python":"def is_djvu(file_path: str) -> bool:\n    \"\"\"Check if file is a valid DJVU by magic bytes.\"\"\"\n    signature = bytes([0x41, 0x54, 0x26, 0x54, 0x46, 0x4F, 0x52, 0x4D])\n    with open(file_path, \"rb\") as f:\n        return f.read(8) == signature","node":"function isDJVU(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x41, 0x54, 0x26, 0x54, 0x46, 0x4F, 0x52, 0x4D]);\n  return buffer.subarray(0, 8).equals(signature);\n}","go":"func IsDJVU(data []byte) bool {\n    signature := []byte{0x41, 0x54, 0x26, 0x54, 0x46, 0x4F, 0x52, 0x4D}\n    if len(data) < 8 {\n        return false\n    }\n    return bytes.Equal(data[:8], signature)\n}"},"category":"Documents"}}