// Detect It Easy: detection rule file
// Author: horsicq <horsicq@gmail.com>

meta("format", "RTF");

function detect() {
    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) { return; }
    }

    return result();
}