{"success":true,"data":{"ext":"sap","name":"SAP","description":"The SAP file format is an audio module format used for Atari 8-bit computer music, documented and maintained by the Atari SAP community. It is used to store chiptune recordings and game music for playback in emulators, media players, and archival collections. The format is legacy and generally safe, though untrusted files should be opened with software that validates headers and emulates the original hardware correctly.","mime":["audio/x-sap"],"risk_level":"Safe","signatures":[{"hex":"53 41 50 0D 0A","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"}]}],"related":[],"usage":{"python":"def is_sap(file_path: str) -> bool:\n    \"\"\"Check if file is a valid SAP by magic bytes.\"\"\"\n    signature = bytes([0x53, 0x41, 0x50, 0x0D, 0x0A])\n    with open(file_path, \"rb\") as f:\n        return f.read(5) == signature","node":"function isSAP(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x53, 0x41, 0x50, 0x0D, 0x0A]);\n  return buffer.subarray(0, 5).equals(signature);\n}","go":"func IsSAP(data []byte) bool {\n    signature := []byte{0x53, 0x41, 0x50, 0x0D, 0x0A}\n    if len(data) < 5 {\n        return false\n    }\n    return bytes.Equal(data[:5], signature)\n}"},"category":"Audio"}}