{"success":true,"data":{"ext":"pk4","name":"PK4","description":"PK4 is a ZIP-based archive format used by id Software’s id Tech 4 engine and maintained as part of that game content packaging ecosystem. It is commonly used to store maps, textures, models, sounds, and other resources for games and mod projects, especially in Doom 3 and related titles. Like other archive formats, it can contain compressed content and should be opened cautiously when obtained from untrusted sources.","mime":["application/octet-stream"],"risk_level":"Safe","signatures":[{"hex":"50 4B 03 04","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"50 4B 05 06","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"50 4B 07 08","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":[],"usage":{"python":"def is_pk4(file_path: str) -> bool:\n    \"\"\"Check if file is a valid PK4 by magic bytes.\"\"\"\n    signature = bytes([0x50, 0x4B, 0x03, 0x04])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isPK4(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x50, 0x4B, 0x03, 0x04]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsPK4(data []byte) bool {\n    signature := []byte{0x50, 0x4B, 0x03, 0x04}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"}}}