MA
application/mathematica
Magic Bytes
Offset: 0
28 2A 2A
The MA file format is a legacy notebook format developed by Wolfram Research for early versions of the Mathematica computational software system. It served as the standard container for saving mathematical calculations, symbolic code, visualizations, and document annotations. While superseded by the NB format in version 3.0, these ASCII-based text files generally remain readable by modern Wolfram products for archival and compatibility purposes.
Validation Code
How to validate .ma files in Python
Python
def is_ma(file_path: str) -> bool:
"""Check if file is a valid MA by magic bytes."""
signature = bytes([0x28, 0x2A, 0x2A])
with open(file_path, "rb") as f:
return f.read(3) == signature
How to validate .ma files in Node.js
Node.js
function isMA(buffer: Buffer): boolean {
const signature = Buffer.from([0x28, 0x2A, 0x2A]);
return buffer.subarray(0, 3).equals(signature);
}
Go
func IsMA(data []byte) bool {
signature := []byte{0x28, 0x2A, 0x2A}
if len(data) < 3 {
return false
}
return bytes.Equal(data[:3], signature)
}
API Endpoint
GET
/api/v1/ma
curl https://filesignature.org/api/v1/ma