{"success":true,"data":{"ext":"avi","name":"Resource Interchange File Format --Windows Audio VideoInterleave file","description":"Audio Video Interleave (AVI) is a multimedia container format developed by Microsoft as part of the Resource Interchange File Format family. It is used to store synchronized audio and video streams for playback, editing, and archival in desktop media applications. AVI is a legacy format with limited support for modern features, but it is generally safe; as with other containers, files from untrusted sources should still be handled cautiously.","mime":["video/x-msvideo"],"risk_level":"Safe","signatures":[{"hex":"41 56 49 20","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"},{"name":"Neil Harvey FileSignatures","url":"https://raw.githubusercontent.com/neilharvey/FileSignatures/master/src/FileSignatures/Formats/Avi.cs"}]},{"hex":"52 49 46 46 2E 2E 2E 2E 41 56 49 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":"41 56 49 20","offset":8,"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":"52 49 46 46","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"52 49 46 46 41 56 49 20 4C 49 53 54","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["asf","wmv","3g2","3gp","flv","m2v"],"usage":{"python":"def is_avi(file_path: str) -> bool:\n    \"\"\"Check if file is a valid AVI by magic bytes.\"\"\"\n    signature = bytes([0x41, 0x56, 0x49, 0x20])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isAVI(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x41, 0x56, 0x49, 0x20]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsAVI(data []byte) bool {\n    signature := []byte{0x41, 0x56, 0x49, 0x20}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"},"category":"Video"}}