{"success":true,"data":{"ext":"swm","name":"SWM","description":"Split Windows Imaging Format (SWM) is a file format created and maintained by Microsoft as part of the Windows Imaging Format ecosystem. It is used to store segmented Windows disk images, commonly for operating system deployment, recovery media, and archival of large images across multiple files. The format is generally safe, though as with any image file, it should be obtained from trusted sources because it can contain data used in system installation and recovery.","mime":[],"risk_level":"Safe","signatures":[{"hex":"4D 53 57 49 4D 00 00 00","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"D0 00 00 00 00","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":["esd","wim"],"usage":{"python":"def is_swm(file_path: str) -> bool:\n    \"\"\"Check if file is a valid SWM by magic bytes.\"\"\"\n    signature = bytes([0x4D, 0x53, 0x57, 0x49, 0x4D, 0x00, 0x00, 0x00])\n    with open(file_path, \"rb\") as f:\n        return f.read(8) == signature","node":"function isSWM(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x4D, 0x53, 0x57, 0x49, 0x4D, 0x00, 0x00, 0x00]);\n  return buffer.subarray(0, 8).equals(signature);\n}","go":"func IsSWM(data []byte) bool {\n    signature := []byte{0x4D, 0x53, 0x57, 0x49, 0x4D, 0x00, 0x00, 0x00}\n    if len(data) < 8 {\n        return false\n    }\n    return bytes.Equal(data[:8], signature)\n}"}}}