CMUS
application/octet-stream
Magic Bytes
Offset: 0
46 4F 52 4D 43 4D 55 53
The CMUS format is an Interchange File Format (IFF) subtype developed for the C-Music composition software on the Commodore Amiga platform. It functions as a structured musical score, storing note data and instrument definitions for playback or sequencing within the original environment. As a legacy format primarily found in retrocomputing archives, it presents a low security risk and requires specialized emulation software or conversion utilities to access on modern systems.
Validation Code
How to validate .cmus files in Python
Python
def is_cmus(file_path: str) -> bool:
"""Check if file is a valid CMUS by magic bytes."""
signature = bytes([0x46, 0x4F, 0x52, 0x4D, 0x43, 0x4D, 0x55, 0x53])
with open(file_path, "rb") as f:
return f.read(8) == signature
How to validate .cmus files in Node.js
Node.js
function isCMUS(buffer: Buffer): boolean {
const signature = Buffer.from([0x46, 0x4F, 0x52, 0x4D, 0x43, 0x4D, 0x55, 0x53]);
return buffer.subarray(0, 8).equals(signature);
}
Go
func IsCMUS(data []byte) bool {
signature := []byte{0x46, 0x4F, 0x52, 0x4D, 0x43, 0x4D, 0x55, 0x53}
if len(data) < 8 {
return false
}
return bytes.Equal(data[:8], signature)
}
API Endpoint
GET
/api/v1/cmus
curl https://filesignature.org/api/v1/cmus