{"success":true,"data":{"ext":"heic","name":"High Efficiency Image Container","description":"High Efficiency Image Container (HEIC) is a container format for still images and image sequences, defined by the Moving Picture Experts Group (MPEG) and standardized within the ISO/IEC HEIF family. It is used on mobile devices and in photo libraries for storing compressed photographs, burst images, and sequences with smaller file sizes than older formats. HEIC is widely supported in modern systems; files from untrusted sources should still be handled with updated software, as decoding vulnerabilities have occasionally affected image libraries.","mime":["image/heic"],"risk_level":"Safe","signatures":[{"hex":"66 74 79 70 68 65 69 63","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"},{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]},{"hex":"66 74 79 70 68 65 69 78","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"}]},{"hex":"66 74 79 70 6D","offset":4,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":["avif","cr3","heif","bmp","cr2","dib"],"usage":{"python":"def is_heic(file_path: str) -> bool:\n    \"\"\"Check if file is a valid HEIC by magic bytes at offset 4.\"\"\"\n    signature = bytes([0x66, 0x74, 0x79, 0x70, 0x68, 0x65, 0x69, 0x63])\n    with open(file_path, \"rb\") as f:\n        f.seek(4)\n        return f.read(8) == signature","node":"function isHEIC(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x66, 0x74, 0x79, 0x70, 0x68, 0x65, 0x69, 0x63]);\n  if (buffer.length < 12) return false;\n  return buffer.subarray(4, 12).equals(signature);\n}","go":"func IsHEIC(data []byte) bool {\n    signature := []byte{0x66, 0x74, 0x79, 0x70, 0x68, 0x65, 0x69, 0x63}\n    if len(data) < 12 {\n        return false\n    }\n    return bytes.Equal(data[4:12], signature)\n}"},"category":"Images"}}