{"success":true,"data":{"ext":"gp4","name":"GP4","description":"GP4 is a Guitar Pro 4 song file format developed by Arobas Music for storing guitar tablature and musical scores. It is used to create, edit, and play back arrangements in Guitar Pro and compatible notation software, supporting instruments, lyrics, and playback settings. As a legacy format from an older version of Guitar Pro, it is generally safe to open, though files from untrusted sources should still be handled with standard caution.","mime":["application/x-guitar-pro"],"risk_level":"Safe","signatures":[{"hex":"46 49 43 48 49 45 52 20 47 55 49 54 41 52 45 20 50 52 4F 20","offset":1,"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":"46 49 43 48 49 45 52 20 47 55 49 54 41 52 20 50 52 4F 20","offset":1,"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":[],"usage":{"python":"def is_gp4(file_path: str) -> bool:\n    \"\"\"Check if file is a valid GP4 by magic bytes at offset 1.\"\"\"\n    signature = bytes([0x46, 0x49, 0x43, 0x48, 0x49, 0x45, 0x52, 0x20, 0x47, 0x55, 0x49, 0x54, 0x41, 0x52, 0x45, 0x20, 0x50, 0x52, 0x4F, 0x20])\n    with open(file_path, \"rb\") as f:\n        f.seek(1)\n        return f.read(20) == signature","node":"function isGP4(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x46, 0x49, 0x43, 0x48, 0x49, 0x45, 0x52, 0x20, 0x47, 0x55, 0x49, 0x54, 0x41, 0x52, 0x45, 0x20, 0x50, 0x52, 0x4F, 0x20]);\n  if (buffer.length < 21) return false;\n  return buffer.subarray(1, 21).equals(signature);\n}","go":"func IsGP4(data []byte) bool {\n    signature := []byte{0x46, 0x49, 0x43, 0x48, 0x49, 0x45, 0x52, 0x20, 0x47, 0x55, 0x49, 0x54, 0x41, 0x52, 0x45, 0x20, 0x50, 0x52, 0x4F, 0x20}\n    if len(data) < 21 {\n        return false\n    }\n    return bytes.Equal(data[1:21], signature)\n}"}}}