TBZ

application/x-bzip

Safe

Magic Bytes

Offset: 0
42 5A 30

TBZ is a compressed archive format created by Julian Seward that utilizes the Bzip compression algorithm to package multiple files into a single container. This format is primarily employed within Unix and Linux environments for distributing software source code and creating efficient data backups. Now largely considered a legacy standard, it has been superseded by the more efficient Bzip2 and XZ formats, though it remains safe due to its inherent lack of executable capabilities.

Extension

.tbz

MIME Type

application/x-bzip

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .tbz files in Python

Python
def is_tbz(file_path: str) -> bool:
    """Check if file is a valid TBZ by magic bytes."""
    signature = bytes([0x42, 0x5A, 0x30])
    with open(file_path, "rb") as f:
        return f.read(3) == signature

How to validate .tbz files in Node.js

Node.js
function isTBZ(buffer: Buffer): boolean {
  const signature = Buffer.from([0x42, 0x5A, 0x30]);
  return buffer.subarray(0, 3).equals(signature);
}
Go
func IsTBZ(data []byte) bool {
    signature := []byte{0x42, 0x5A, 0x30}
    if len(data) < 3 {
        return false
    }
    return bytes.Equal(data[:3], signature)
}

API Endpoint

GET /api/v1/tbz
curl https://filesignature.org/api/v1/tbz

Related Formats