PCT (.pct)
.pct file signature | image/x-pict
Magic Bytes
Offset 522
00 11 02 FF 0C 00
Sources: Apache Tika
Extension
.pct
MIME Type
image/x-pict
Byte Offset
522
Risk Level
Safe
Validation Code
How to validate .pct files in Python
def is_pct(file_path: str) -> bool:
"""Check if file is a valid PCT by magic bytes."""
signature = bytes([0x00, 0x11, 0x02, 0xFF, 0x0C, 0x00])
with open(file_path, "rb") as f:
return f.read(6) == signature
How to validate .pct files in Node.js
function isPCT(buffer: Buffer): boolean {
const signature = Buffer.from([0x00, 0x11, 0x02, 0xFF, 0x0C, 0x00]);
return buffer.subarray(0, 6).equals(signature);
}
How to validate .pct files in Go
func IsPCT(data []byte) bool {
signature := []byte{0x00, 0x11, 0x02, 0xFF, 0x0C, 0x00}
if len(data) < 6 {
return false
}
return bytes.Equal(data[:6], signature)
}
API Endpoint
/api/v1/pct
curl https://filesignature.org/api/v1/pct
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .pct file?
A .pct file is a PCT file.
What are the magic bytes for .pct files?
The magic bytes for PCT files are 00 11 02 FF 0C 00 at byte offset 522. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .pct file?
To validate a .pct file, read the first bytes of the file and compare them against the known magic bytes (00 11 02 FF 0C 00) at offset 522. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .pct files?
The primary MIME type for .pct files is image/x-pict.
Is it safe to open .pct files?
PCT (.pct) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.