Lotus AMI Pro document

application/octet-stream

Safe

Magic Bytes

Offset: 0
5B 56 4D 44 5D

Lotus AMI Pro document (SAM) is a legacy word processing format originally developed by Samna Corporation and later maintained by Lotus Development Corporation. It served as the primary file type for the AMI Pro office suite, facilitating complex document layout and text editing during the early Windows era. Although now obsolete, this format is considered safe due to its lack of complex macro execution capabilities common in modern productivity software.

Extension

.sam

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .sam files in Python

Python
def is_sam(file_path: str) -> bool:
    """Check if file is a valid SAM by magic bytes."""
    signature = bytes([0x5B, 0x56, 0x4D, 0x44, 0x5D])
    with open(file_path, "rb") as f:
        return f.read(5) == signature

How to validate .sam files in Node.js

Node.js
function isSAM(buffer: Buffer): boolean {
  const signature = Buffer.from([0x5B, 0x56, 0x4D, 0x44, 0x5D]);
  return buffer.subarray(0, 5).equals(signature);
}
Go
func IsSAM(data []byte) bool {
    signature := []byte{0x5B, 0x56, 0x4D, 0x44, 0x5D}
    if len(data) < 5 {
        return false
    }
    return bytes.Equal(data[:5], signature)
}

API Endpoint

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

Related Formats