// DIE's signature file

init("format", "RTF");

function detect(bShowType, bShowVersion, bShowOptions) {
    if (/^{\\rtf1?/.test(File.read_ansiString(0, 6))) {
        bDetected = true;
        for (var i = 4; i < Math.min(File.getSize(), 0x100); i++)
            if (File.read_uint8(i) & 0x80) { bDetected = false; break; }
    }
    return result(bShowType, bShowVersion, bShowOptions);
}