{"success":true,"data":{"ext":"nes","name":"NES","description":"The NES file format is a ROM image for Nintendo Entertainment System game cartridges, originally defined by Nintendo and preserved by emulator developers and archival projects. It is used for storing and running classic console games in emulators, homebrew development, and digital preservation. As a legacy format, it may contain copyrighted software and, like other ROM images, should be obtained from trusted sources.","mime":["application/x-nesrom"],"risk_level":"Safe","signatures":[{"hex":"4E 45 53 1A","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":"4E 45 53","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":[],"usage":{"python":"def is_nes(file_path: str) -> bool:\n    \"\"\"Check if file is a valid NES by magic bytes.\"\"\"\n    signature = bytes([0x4E, 0x45, 0x53, 0x1A])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isNES(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x4E, 0x45, 0x53, 0x1A]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsNES(data []byte) bool {\n    signature := []byte{0x4E, 0x45, 0x53, 0x1A}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"}}}