{"success":true,"data":{"ext":"bz","name":"BZ","description":"BZ is a compressed archive file format associated with the bzip and bzip2 compression tools, originally created by Julian Seward and maintained through the bzip2 project. It is used to reduce file size for software distributions, backups, and data transfers, often as a single compressed data stream rather than a multi-file archive. The format is generally safe, though decompression can consume significant memory and time for very large or malformed files.","mime":["application/x-bzip"],"risk_level":"Safe","signatures":[{"hex":"42 5A 30","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":["7z","ace","arj","bz2","cab","cpio"],"usage":{"python":"def is_bz(file_path: str) -> bool:\n    \"\"\"Check if file is a valid BZ by magic bytes.\"\"\"\n    signature = bytes([0x42, 0x5A, 0x30])\n    with open(file_path, \"rb\") as f:\n        return f.read(3) == signature","node":"function isBZ(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x42, 0x5A, 0x30]);\n  return buffer.subarray(0, 3).equals(signature);\n}","go":"func IsBZ(data []byte) bool {\n    signature := []byte{0x42, 0x5A, 0x30}\n    if len(data) < 3 {\n        return false\n    }\n    return bytes.Equal(data[:3], signature)\n}"},"category":"Archives"}}