E57
model/e57
Magic Bytes
Offset: 0
41 53 54 4D 2D 45 35 37
The E57 file format is a vendor-neutral standard developed by the ASTM International Committee E57 for storing 3D imaging data. It is primarily used for exchanging point cloud data, imagery, and metadata between laser scanners and engineering, surveying, or construction software. This format utilizes a hierarchical structure combining XML and compressed binary; it is generally considered safe as it does not typically support executable scripts or macros.
Validation Code
How to validate .e57 files in Python
Python
def is_e57(file_path: str) -> bool:
"""Check if file is a valid E57 by magic bytes."""
signature = bytes([0x41, 0x53, 0x54, 0x4D, 0x2D, 0x45, 0x35, 0x37])
with open(file_path, "rb") as f:
return f.read(8) == signature
How to validate .e57 files in Node.js
Node.js
function isE57(buffer: Buffer): boolean {
const signature = Buffer.from([0x41, 0x53, 0x54, 0x4D, 0x2D, 0x45, 0x35, 0x37]);
return buffer.subarray(0, 8).equals(signature);
}
Go
func IsE57(data []byte) bool {
signature := []byte{0x41, 0x53, 0x54, 0x4D, 0x2D, 0x45, 0x35, 0x37}
if len(data) < 8 {
return false
}
return bytes.Equal(data[:8], signature)
}
API Endpoint
GET
/api/v1/e57
curl https://filesignature.org/api/v1/e57