T

text/troff

Safe

Magic Bytes

Offset: 0
2E 5C 22

The T format, formally known as Troff, is a document processing system developed by Joe Ossanna at Bell Laboratories for the Unix operating system. It is primarily utilized for typesetting technical documentation, academic papers, and generating Unix manual pages through specialized macro packages. As a legacy plain-text format, it is considered safe for general use, although it has largely been superseded by modern document preparation systems like TeX or markup languages.

Extension

.t

MIME Type

text/troff

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .t files in Python

Python
def is_t(file_path: str) -> bool:
    """Check if file is a valid T by magic bytes."""
    signature = bytes([0x2E, 0x5C, 0x22])
    with open(file_path, "rb") as f:
        return f.read(3) == signature

How to validate .t files in Node.js

Node.js
function isT(buffer: Buffer): boolean {
  const signature = Buffer.from([0x2E, 0x5C, 0x22]);
  return buffer.subarray(0, 3).equals(signature);
}
Go
func IsT(data []byte) bool {
    signature := []byte{0x2E, 0x5C, 0x22}
    if len(data) < 3 {
        return false
    }
    return bytes.Equal(data[:3], signature)
}

API Endpoint

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

Related Formats