SAP
audio/x-sap
Magic Bytes
Offset: 0
53 41 50 0D 0A
SAP (Slight Atari Player) is a legacy audio container format developed by the retrocomputing community to preserve and play music from the Atari 8-bit computer family. It is primarily used within specialized emulators and dedicated players to reproduce the output of the POKEY sound chip found in XL and XE hardware models. Storing proprietary register data, the format poses minimal security risks; however, users require third-party plugins to facilitate playback on modern operating systems.
Validation Code
How to validate .sap files in Python
Python
def is_sap(file_path: str) -> bool:
"""Check if file is a valid SAP by magic bytes."""
signature = bytes([0x53, 0x41, 0x50, 0x0D, 0x0A])
with open(file_path, "rb") as f:
return f.read(5) == signature
How to validate .sap files in Node.js
Node.js
function isSAP(buffer: Buffer): boolean {
const signature = Buffer.from([0x53, 0x41, 0x50, 0x0D, 0x0A]);
return buffer.subarray(0, 5).equals(signature);
}
Go
func IsSAP(data []byte) bool {
signature := []byte{0x53, 0x41, 0x50, 0x0D, 0x0A}
if len(data) < 5 {
return false
}
return bytes.Equal(data[:5], signature)
}
API Endpoint
GET
/api/v1/sap
curl https://filesignature.org/api/v1/sap