{"success":true,"data":{"ext":"lz","name":"LZ","description":"LZ is a compressed file format used by lzip, created and maintained by the lzip project. It is used for lossless data compression and decompression in software distribution, backup archives, and file transfer workflows, often through command-line utilities and compatible decompression tools. The format is generally safe to open, though as with any compressed file it may expand to a large size; it is not a legacy or obsolete format.","mime":["application/x-lzip"],"risk_level":"Safe","signatures":[{"hex":"4C 5A 49 50","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"}]}],"related":["7z","ace","arj","bz","bz2","cab"],"usage":{"python":"def is_lz(file_path: str) -> bool:\n    \"\"\"Check if file is a valid LZ by magic bytes.\"\"\"\n    signature = bytes([0x4C, 0x5A, 0x49, 0x50])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isLZ(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x4C, 0x5A, 0x49, 0x50]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsLZ(data []byte) bool {\n    signature := []byte{0x4C, 0x5A, 0x49, 0x50}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"},"category":"Archives"}}