TEXI (.texi)
.texi file signature | application/x-texinfo
Magic Bytes
Offset 0
5C 69 6E 70 75 74 20 74 65 78 69 6E 66 6F
Sources: Apache Tika
Extension
.texi
MIME Type
application/x-texinfo
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .texi files in Python
def is_texi(file_path: str) -> bool:
"""Check if file is a valid TEXI by magic bytes."""
signature = bytes([0x5C, 0x69, 0x6E, 0x70, 0x75, 0x74, 0x20, 0x74, 0x65, 0x78, 0x69, 0x6E, 0x66, 0x6F])
with open(file_path, "rb") as f:
return f.read(14) == signature
How to validate .texi files in Node.js
function isTEXI(buffer: Buffer): boolean {
const signature = Buffer.from([0x5C, 0x69, 0x6E, 0x70, 0x75, 0x74, 0x20, 0x74, 0x65, 0x78, 0x69, 0x6E, 0x66, 0x6F]);
return buffer.subarray(0, 14).equals(signature);
}
How to validate .texi files in Go
func IsTEXI(data []byte) bool {
signature := []byte{0x5C, 0x69, 0x6E, 0x70, 0x75, 0x74, 0x20, 0x74, 0x65, 0x78, 0x69, 0x6E, 0x66, 0x6F}
if len(data) < 14 {
return false
}
return bytes.Equal(data[:14], signature)
}
API Endpoint
/api/v1/texi
curl https://filesignature.org/api/v1/texi
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .texi file?
A .texi file is a TEXI file.
What are the magic bytes for .texi files?
The magic bytes for TEXI files are 5C 69 6E 70 75 74 20 74 65 78 69 6E 66 6F at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .texi file?
To validate a .texi file, read the first bytes of the file and compare them against the known magic bytes (5C 69 6E 70 75 74 20 74 65 78 69 6E 66 6F) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .texi files?
The primary MIME type for .texi files is application/x-texinfo.
Is it safe to open .texi files?
TEXI (.texi) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.