{"success":true,"data":{"ext":"sxw","name":"OpenOffice spreadsheet","description":"OpenOffice Writer XML (SXW) is a legacy word-processing document format created by OpenOffice.org and later supported by the Apache OpenOffice project. It was used for letters, reports, manuals, and other text documents in OpenOffice Writer and compatible office suites. The format is largely obsolete and may be opened by modern applications for backward compatibility; as with other document files, untrusted content should be handled with care.","mime":["application/vnd.sun.xml.writer"],"risk_level":"Safe","signatures":[{"hex":"50 4B","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":"50 4B 03 04","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["sxc","sxd","sxi"],"usage":{"python":"def is_sxw(file_path: str) -> bool:\n    \"\"\"Check if file is a valid SXW by magic bytes.\"\"\"\n    signature = bytes([0x50, 0x4B])\n    with open(file_path, \"rb\") as f:\n        return f.read(2) == signature","node":"function isSXW(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x50, 0x4B]);\n  return buffer.subarray(0, 2).equals(signature);\n}","go":"func IsSXW(data []byte) bool {\n    signature := []byte{0x50, 0x4B}\n    if len(data) < 2 {\n        return false\n    }\n    return bytes.Equal(data[:2], signature)\n}"}}}