{"success":true,"data":{"ext":"z","name":"Z","description":"Z is a legacy compressed file format associated with the Unix compress utility, originally developed at Bell Labs and later maintained through Unix-compatible implementations. It was used to reduce file size for software distributions, archived data, and network transfers, especially on older Unix systems and in early internet file exchanges. The format is now largely obsolete, and although it is generally safe to open, some modern tools handle it less reliably than current compression formats.","mime":["application/x-compress"],"risk_level":"Safe","signatures":[{"hex":"1F 9D","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"},{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"1F A0","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":["7z","ace","arj","bz","bz2","cab"],"usage":{"python":"def is_z(file_path: str) -> bool:\n    \"\"\"Check if file is a valid Z by magic bytes.\"\"\"\n    signature = bytes([0x1F, 0x9D])\n    with open(file_path, \"rb\") as f:\n        return f.read(2) == signature","node":"function isZ(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x1F, 0x9D]);\n  return buffer.subarray(0, 2).equals(signature);\n}","go":"func IsZ(data []byte) bool {\n    signature := []byte{0x1F, 0x9D}\n    if len(data) < 2 {\n        return false\n    }\n    return bytes.Equal(data[:2], signature)\n}"},"category":"Archives"}}