BigTIFF files; Tagged Image File Format files >4 GB
image/tiff
Magic Bytes
Offset: 0
49 49 2A 00
BigTIFF is an extension of the Tagged Image File Format (TIFF) created by Aldus Corporation and maintained by Adobe Systems to overcome the four-gigabyte size limitation. It is primarily utilized for high-resolution geospatial data, large-scale medical scanning, and professional digital archiving where lossless quality is essential. While generally considered safe, the standard’s extensibility and support for multiple compression algorithms require modern software to ensure secure parsing and to mitigate potential heap-based vulnerabilities.
Validation Code
How to validate .tif files in Python
Python
def is_tif(file_path: str) -> bool:
"""Check if file is a valid TIF by magic bytes."""
signature = bytes([0x49, 0x49, 0x2A, 0x00])
with open(file_path, "rb") as f:
return f.read(4) == signature
How to validate .tif files in Node.js
Node.js
function isTIF(buffer: Buffer): boolean {
const signature = Buffer.from([0x49, 0x49, 0x2A, 0x00]);
return buffer.subarray(0, 4).equals(signature);
}
Go
func IsTIF(data []byte) bool {
signature := []byte{0x49, 0x49, 0x2A, 0x00}
if len(data) < 4 {
return false
}
return bytes.Equal(data[:4], signature)
}
API Endpoint
GET
/api/v1/tif
curl https://filesignature.org/api/v1/tif