{"success":true,"data":{"ext":"tzx","name":"TZX","description":"TZX is a cassette tape image format for the ZX Spectrum, originally defined by the Spectrum Tape Archive community and maintained by preservation and emulation projects. It is used to preserve, distribute, and load software, games, and utilities recorded from ZX Spectrum tapes in emulators and archival collections. As a legacy preservation format, it is generally safe to open, though files from untrusted sources should still be handled with standard caution.","mime":["application/x-spectrum-tzx"],"risk_level":"Safe","signatures":[{"hex":"5A 58 54 61 70 65 21 1A","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":[],"usage":{"python":"def is_tzx(file_path: str) -> bool:\n    \"\"\"Check if file is a valid TZX by magic bytes.\"\"\"\n    signature = bytes([0x5A, 0x58, 0x54, 0x61, 0x70, 0x65, 0x21, 0x1A])\n    with open(file_path, \"rb\") as f:\n        return f.read(8) == signature","node":"function isTZX(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x5A, 0x58, 0x54, 0x61, 0x70, 0x65, 0x21, 0x1A]);\n  return buffer.subarray(0, 8).equals(signature);\n}","go":"func IsTZX(data []byte) bool {\n    signature := []byte{0x5A, 0x58, 0x54, 0x61, 0x70, 0x65, 0x21, 0x1A}\n    if len(data) < 8 {\n        return false\n    }\n    return bytes.Equal(data[:8], signature)\n}"}}}