{"success":true,"data":{"ext":"ico","name":"Windows icon file","description":"The Windows icon file format (ICO) is a Microsoft file format used to store icons for the Windows operating system. It is commonly used for application icons, desktop shortcuts, and website favicons, and is supported by many image editors and development tools. The format is longstanding but still widely used; ICO files are generally safe, though like any image file they should be obtained from trusted sources.","mime":["image/vnd.microsoft.icon"],"risk_level":"Safe","signatures":[{"hex":"00 00 01 00","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"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"},{"name":"Neil Harvey FileSignatures","url":"https://raw.githubusercontent.com/neilharvey/FileSignatures/master/src/FileSignatures/Formats/Icon.cs"}]},{"hex":"42 41 28 00 00 00 2E 00 00 00 00 00 00 00","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":["bmp","dib","avif","cr2","cr3","exr"],"usage":{"python":"def is_ico(file_path: str) -> bool:\n    \"\"\"Check if file is a valid ICO by magic bytes.\"\"\"\n    signature = bytes([0x00, 0x00, 0x01, 0x00])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isICO(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x00, 0x00, 0x01, 0x00]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsICO(data []byte) bool {\n    signature := []byte{0x00, 0x00, 0x01, 0x00}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"},"category":"Images"}}