PMT
application/octet-stream
Magic Bytes
Offset: 0
78 56 34
The PMT file format is a proprietary data structure associated with the PPMd compression algorithm, originally developed by Dmitry Shkarin. It is primarily utilized for storing compressed message templates and archived data within specialized communication software and file archival utilities. This legacy format is considered safe as it contains static compressed data, though users should ensure that extraction utilities are up to date to prevent potential vulnerabilities when processing files from unknown sources.
Validation Code
How to validate .pmt files in Python
Python
def is_pmt(file_path: str) -> bool:
"""Check if file is a valid PMT by magic bytes."""
signature = bytes([0x78, 0x56, 0x34])
with open(file_path, "rb") as f:
return f.read(3) == signature
How to validate .pmt files in Node.js
Node.js
function isPMT(buffer: Buffer): boolean {
const signature = Buffer.from([0x78, 0x56, 0x34]);
return buffer.subarray(0, 3).equals(signature);
}
Go
func IsPMT(data []byte) bool {
signature := []byte{0x78, 0x56, 0x34}
if len(data) < 3 {
return false
}
return bytes.Equal(data[:3], signature)
}
API Endpoint
GET
/api/v1/pmt
curl https://filesignature.org/api/v1/pmt