{"success":true,"data":{"ext":"mat","name":"MATLAB v5 workspace file","description":"MATLAB v5 workspace files are data files created by MathWorks for storing variables and arrays used by the MATLAB environment. They are commonly used to save and exchange scientific, engineering, and numerical data between MATLAB sessions and compatible tools. This is a legacy format associated with older MATLAB releases; it is generally safe to open, although files from untrusted sources should still be treated with normal caution.","mime":["application/x-matlab-data"],"risk_level":"Safe","signatures":[{"hex":"4D 41 54 4C 41 42","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"4D 41 54 4C 41 42 20 35 2E 30 20 4D 41 54 2D 66 69 6C 65","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":[],"usage":{"python":"def is_mat(file_path: str) -> bool:\n    \"\"\"Check if file is a valid MAT by magic bytes.\"\"\"\n    signature = bytes([0x4D, 0x41, 0x54, 0x4C, 0x41, 0x42])\n    with open(file_path, \"rb\") as f:\n        return f.read(6) == signature","node":"function isMAT(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x4D, 0x41, 0x54, 0x4C, 0x41, 0x42]);\n  return buffer.subarray(0, 6).equals(signature);\n}","go":"func IsMAT(data []byte) bool {\n    signature := []byte{0x4D, 0x41, 0x54, 0x4C, 0x41, 0x42}\n    if len(data) < 6 {\n        return false\n    }\n    return bytes.Equal(data[:6], signature)\n}"}}}