{"success":true,"data":{"ext":"sd2","name":"SD2","description":"SD2 is a SAS Version 6 data set file format developed and maintained by SAS Institute for storing structured statistical data. It is used in SAS analytical workflows to exchange, archive, and process tabular data within the SAS ecosystem and compatible tools. As a legacy format, SD2 may appear in older datasets; files should be opened with trusted software, but the format itself is not typically associated with security risks.","mime":["application/x-sas-data-v6"],"risk_level":"Safe","signatures":[{"hex":"53 41 53 20 20 20 20 20 36 2E","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":"53 41 53 20 20 20 20 20 37 2E","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":"53 41 53 20 20 20 20 20 38 2E 30","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":"53 41 53 20 20 20 20 20 39 2E 30","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"}]}],"related":["sas7bdat","sd7"],"usage":{"python":"def is_sd2(file_path: str) -> bool:\n    \"\"\"Check if file is a valid SD2 by magic bytes.\"\"\"\n    signature = bytes([0x53, 0x41, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x36, 0x2E])\n    with open(file_path, \"rb\") as f:\n        return f.read(10) == signature","node":"function isSD2(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x53, 0x41, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x36, 0x2E]);\n  return buffer.subarray(0, 10).equals(signature);\n}","go":"func IsSD2(data []byte) bool {\n    signature := []byte{0x53, 0x41, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x36, 0x2E}\n    if len(data) < 10 {\n        return false\n    }\n    return bytes.Equal(data[:10], signature)\n}"}}}