{"success":true,"data":{"ext":"tb2","name":"bzip2compressed archive","description":"The TB2 format is a bzip2-compressed archive format associated with the bzip2 compression utility, originally created by Julian Seward and maintained as an open-source standard. It is used to reduce file size for software distributions, backups, and other data transfers where storage efficiency and decompression compatibility are important. The format is generally safe, though malformed archives can cause decompression errors, and bzip2 has largely been superseded by newer compressors in some workflows.","mime":[],"risk_level":"Safe","signatures":[{"hex":"42 5A 68","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["bz2","tbz2"],"usage":{"python":"def is_tb2(file_path: str) -> bool:\n    \"\"\"Check if file is a valid TB2 by magic bytes.\"\"\"\n    signature = bytes([0x42, 0x5A, 0x68])\n    with open(file_path, \"rb\") as f:\n        return f.read(3) == signature","node":"function isTB2(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x42, 0x5A, 0x68]);\n  return buffer.subarray(0, 3).equals(signature);\n}","go":"func IsTB2(data []byte) bool {\n    signature := []byte{0x42, 0x5A, 0x68}\n    if len(data) < 3 {\n        return false\n    }\n    return bytes.Equal(data[:3], signature)\n}"}}}