A
application/x-archive
Magic Bytes
Offset: 0
3D 3C 61 72 3E
The Unix Static Library is an archive file format originally developed by AT&T for the Unix operating system. It primarily functions as a container for bundling multiple compiled object files together to facilitate the linking phase of software development. While newer compression formats have superseded it for general storage, this legacy standard remains a fundamental component of modern C and C++ build environments and is generally considered safe.
Validation Code
How to validate .a files in Python
Python
def is_a(file_path: str) -> bool:
"""Check if file is a valid A by magic bytes."""
signature = bytes([0x3D, 0x3C, 0x61, 0x72, 0x3E])
with open(file_path, "rb") as f:
return f.read(5) == signature
How to validate .a files in Node.js
Node.js
function isA(buffer: Buffer): boolean {
const signature = Buffer.from([0x3D, 0x3C, 0x61, 0x72, 0x3E]);
return buffer.subarray(0, 5).equals(signature);
}
Go
func IsA(data []byte) bool {
signature := []byte{0x3D, 0x3C, 0x61, 0x72, 0x3E}
if len(data) < 5 {
return false
}
return bytes.Equal(data[:5], signature)
}
API Endpoint
GET
/api/v1/a
curl https://filesignature.org/api/v1/a