LUAC

application/octet-stream

Safe

Magic Bytes

Offset: 0
1B 4C 75 61

LUAC is a binary file format representing compiled Lua bytecode, originally developed by the Pontifical Catholic University of Rio de Janeiro. It is primarily used to distribute pre-compiled code chunks, which decreases application load times and obscures source logic in embedded systems and game development. Because the binary structure is strictly tied to specific system architectures and compiler versions, these files are generally incompatible across different iterations of the Lua virtual machine.

Extension

.luac

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .luac files in Python

Python
def is_luac(file_path: str) -> bool:
    """Check if file is a valid LUAC by magic bytes."""
    signature = bytes([0x1B, 0x4C, 0x75, 0x61])
    with open(file_path, "rb") as f:
        return f.read(4) == signature

How to validate .luac files in Node.js

Node.js
function isLUAC(buffer: Buffer): boolean {
  const signature = Buffer.from([0x1B, 0x4C, 0x75, 0x61]);
  return buffer.subarray(0, 4).equals(signature);
}
Go
func IsLUAC(data []byte) bool {
    signature := []byte{0x1B, 0x4C, 0x75, 0x61}
    if len(data) < 4 {
        return false
    }
    return bytes.Equal(data[:4], signature)
}

API Endpoint

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

Related Formats