{"success":true,"data":{"ext":"wpg","name":"WordPerfect text and graphics file","description":"WordPerfect text and graphics file (WPG) is a legacy document and illustration format associated with WordPerfect, originally developed by WordPerfect Corporation and later maintained by Corel. It was used to store text, drawings, and embedded graphics for documents created in WordPerfect and related publishing workflows. The format is largely obsolete today, but files may still appear in archival collections; as a non-executable document format, it generally presents limited security risk when opened in modern viewers.","mime":[],"risk_level":"Safe","signatures":[{"hex":"FF 57 50 43","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["wp","wp5","wp6","wpd","wpp"],"usage":{"python":"def is_wpg(file_path: str) -> bool:\n    \"\"\"Check if file is a valid WPG by magic bytes.\"\"\"\n    signature = bytes([0xFF, 0x57, 0x50, 0x43])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isWPG(buffer: Buffer): boolean {\n  const signature = Buffer.from([0xFF, 0x57, 0x50, 0x43]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsWPG(data []byte) bool {\n    signature := []byte{0xFF, 0x57, 0x50, 0x43}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"}}}