{"success":true,"data":{"ext":"heif","name":"HEIF","description":"High Efficiency Image File Format (HEIF) is a container format standardized by ISO/IEC and developed by the Moving Picture Experts Group (MPEG) for storing image data and related metadata. It is used for still images, image sequences, and auxiliary image information in cameras, mobile devices, and photo applications, often supporting advanced compression features. HEIF is generally safe to open, though support varies across software and some files may contain multiple images or metadata that require compatible viewers.","mime":["image/heif"],"risk_level":"Safe","signatures":[{"hex":"66 74 79 70 6D 69 66 31","offset":4,"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":["avif","cr3","heic","bmp","cr2","dib"],"usage":{"python":"def is_heif(file_path: str) -> bool:\n    \"\"\"Check if file is a valid HEIF by magic bytes at offset 4.\"\"\"\n    signature = bytes([0x66, 0x74, 0x79, 0x70, 0x6D, 0x69, 0x66, 0x31])\n    with open(file_path, \"rb\") as f:\n        f.seek(4)\n        return f.read(8) == signature","node":"function isHEIF(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x66, 0x74, 0x79, 0x70, 0x6D, 0x69, 0x66, 0x31]);\n  if (buffer.length < 12) return false;\n  return buffer.subarray(4, 12).equals(signature);\n}","go":"func IsHEIF(data []byte) bool {\n    signature := []byte{0x66, 0x74, 0x79, 0x70, 0x6D, 0x69, 0x66, 0x31}\n    if len(data) < 12 {\n        return false\n    }\n    return bytes.Equal(data[4:12], signature)\n}"},"category":"Images"}}