{"success":true,"data":{"ext":"g64","name":"Commodore 1541 GCR-encoded disk image","description":"G64 is a GCR-encoded disk image format for the Commodore 1541 floppy disk drive, originally defined for Commodore 64 software preservation and maintained by the retrocomputing community. It is used to archive, transfer, and emulate copy-protected and track-sensitive disk data in C64 emulators and preservation tools. The format is legacy and largely obsolete, and files are generally safe to open with compatible software.","mime":[],"risk_level":"Safe","signatures":[{"hex":"47 43 52 2D 31 35 34 31","offset":0,"sources":[{"name":"Schepers C64 Format Spec","url":"https://ist.uwaterloo.ca/~schepers/formats/G64.TXT"}]},{"hex":"47 65 6E 65 74 65 63 20 4F 6D 6E 69 63 61 73 74","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["adf","dmg","pgd","vhd","vmdk","bin"],"usage":{"python":"def is_g64(file_path: str) -> bool:\n    \"\"\"Check if file is a valid G64 by magic bytes.\"\"\"\n    signature = bytes([0x47, 0x43, 0x52, 0x2D, 0x31, 0x35, 0x34, 0x31])\n    with open(file_path, \"rb\") as f:\n        return f.read(8) == signature","node":"function isG64(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x47, 0x43, 0x52, 0x2D, 0x31, 0x35, 0x34, 0x31]);\n  return buffer.subarray(0, 8).equals(signature);\n}","go":"func IsG64(data []byte) bool {\n    signature := []byte{0x47, 0x43, 0x52, 0x2D, 0x31, 0x35, 0x34, 0x31}\n    if len(data) < 8 {\n        return false\n    }\n    return bytes.Equal(data[:8], signature)\n}"},"category":"Disk Images"}}