Visio/DisplayWrite 4 text file

application/octet-stream

Safe

Magic Bytes

Offset: 0
50 00 00 00 20 00 00 00

Visio/DisplayWrite 4 text file is a legacy word processing format developed by International Business Machines (IBM) for use in DOS-based personal and mainframe computing environments. It was primarily utilized for drafting, formatting, and archiving business documents during the era of text-based word processing software prior to the widespread adoption of graphical editors. As an obsolete format, it poses minimal security risks, though accessing content now requires specific legacy conversion utilities or vintage software emulators.

Extension

.dw4

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .dw4 files in Python

Python
def is_dw4(file_path: str) -> bool:
    """Check if file is a valid DW4 by magic bytes."""
    signature = bytes([0x50, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00])
    with open(file_path, "rb") as f:
        return f.read(8) == signature

How to validate .dw4 files in Node.js

Node.js
function isDW4(buffer: Buffer): boolean {
  const signature = Buffer.from([0x50, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00]);
  return buffer.subarray(0, 8).equals(signature);
}
Go
func IsDW4(data []byte) bool {
    signature := []byte{0x50, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00}
    if len(data) < 8 {
        return false
    }
    return bytes.Equal(data[:8], signature)
}

API Endpoint

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

Related Formats