Resource Interchange File Format -- QualcommPureVoice
application/octet-stream
Magic Bytes
Offset: 0
52 49 46 46 51 4C 43 4D
The Resource Interchange File Format – Qualcomm PureVoice (QCP) is an audio container developed by Qualcomm for storing compressed speech data. It was primarily utilized for voice recording, ringtones, and multimedia messaging on early CDMA cellular networks and mobile devices. While now considered a legacy format superseded by more modern standards like AMR, it remains safe for consumption, though playback often requires specialized software or outdated media codecs.
Validation Code
How to validate .qcp files in Python
Python
def is_qcp(file_path: str) -> bool:
"""Check if file is a valid QCP by magic bytes."""
signature = bytes([0x52, 0x49, 0x46, 0x46, 0x51, 0x4C, 0x43, 0x4D])
with open(file_path, "rb") as f:
return f.read(8) == signature
How to validate .qcp files in Node.js
Node.js
function isQCP(buffer: Buffer): boolean {
const signature = Buffer.from([0x52, 0x49, 0x46, 0x46, 0x51, 0x4C, 0x43, 0x4D]);
return buffer.subarray(0, 8).equals(signature);
}
Go
func IsQCP(data []byte) bool {
signature := []byte{0x52, 0x49, 0x46, 0x46, 0x51, 0x4C, 0x43, 0x4D}
if len(data) < 8 {
return false
}
return bytes.Equal(data[:8], signature)
}
API Endpoint
GET
/api/v1/qcp
curl https://filesignature.org/api/v1/qcp