RS

application/octet-stream

Safe

Magic Bytes

Offset: 0
4D 5A

The RS format is a legacy compiled resource file type developed by Microsoft and various third-party compiler manufacturers to manage binary application components. These files primarily store graphical assets, interface strings, and metadata required by executable programs to function correctly on the host operating system. Although this format shares structural characteristics with executable binaries, it serves as a static data container and is generally considered safe for standard archival purposes in modern computing environments.

Extension

.rs

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .rs files in Python

Python
def is_rs(file_path: str) -> bool:
    """Check if file is a valid RS by magic bytes."""
    signature = bytes([0x4D, 0x5A])
    with open(file_path, "rb") as f:
        return f.read(2) == signature

How to validate .rs files in Node.js

Node.js
function isRS(buffer: Buffer): boolean {
  const signature = Buffer.from([0x4D, 0x5A]);
  return buffer.subarray(0, 2).equals(signature);
}
Go
func IsRS(data []byte) bool {
    signature := []byte{0x4D, 0x5A}
    if len(data) < 2 {
        return false
    }
    return bytes.Equal(data[:2], signature)
}

API Endpoint

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

Related Formats