GNUMERIC (.gnumeric)
.gnumeric file signature | application/x-gnumeric
Magic Bytes
Offset 39
3D 3C 67 6D 72 3A 57 6F 72 6B 62 6F 6F 6B
Sources: Apache Tika
Extension
.gnumeric
MIME Type
application/x-gnumeric
Byte Offset
39
Risk Level
Safe
Validation Code
How to validate .gnumeric files in Python
def is_gnumeric(file_path: str) -> bool:
"""Check if file is a valid GNUMERIC by magic bytes."""
signature = bytes([0x3D, 0x3C, 0x67, 0x6D, 0x72, 0x3A, 0x57, 0x6F, 0x72, 0x6B, 0x62, 0x6F, 0x6F, 0x6B])
with open(file_path, "rb") as f:
return f.read(14) == signature
How to validate .gnumeric files in Node.js
function isGNUMERIC(buffer: Buffer): boolean {
const signature = Buffer.from([0x3D, 0x3C, 0x67, 0x6D, 0x72, 0x3A, 0x57, 0x6F, 0x72, 0x6B, 0x62, 0x6F, 0x6F, 0x6B]);
return buffer.subarray(0, 14).equals(signature);
}
How to validate .gnumeric files in Go
func IsGNUMERIC(data []byte) bool {
signature := []byte{0x3D, 0x3C, 0x67, 0x6D, 0x72, 0x3A, 0x57, 0x6F, 0x72, 0x6B, 0x62, 0x6F, 0x6F, 0x6B}
if len(data) < 14 {
return false
}
return bytes.Equal(data[:14], signature)
}
API Endpoint
/api/v1/gnumeric
curl https://filesignature.org/api/v1/gnumeric
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .gnumeric file?
A .gnumeric file is a GNUMERIC file.
What are the magic bytes for .gnumeric files?
The magic bytes for GNUMERIC files are 3D 3C 67 6D 72 3A 57 6F 72 6B 62 6F 6F 6B at byte offset 39. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .gnumeric file?
To validate a .gnumeric file, read the first bytes of the file and compare them against the known magic bytes (3D 3C 67 6D 72 3A 57 6F 72 6B 62 6F 6F 6B) at offset 39. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .gnumeric files?
The primary MIME type for .gnumeric files is application/x-gnumeric.
Is it safe to open .gnumeric files?
GNUMERIC (.gnumeric) 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.