// Detect It Easy: detection rule file
// Author: hypn0 <hypn0@mail.ru>

meta("format", "");

function detect() {
    if (Binary.compare("7ca0932f")) {
        bDetected = true;
        sName = "R-Studio image";
        if (Binary.compare("78da", 0x38) != -1) {
            sOptions = "compressed (zlib)";
        }
    } else if (Binary.compare("'$CAN'")) {
        switch (Binary.readByte(4)) {
            case 0xe4:
                sOptions = "First or single file";
                break;
            case 0x60:
                sOptions = "next file";
                break;
        }
        bDetected = true;
        sName = "Norton Ghost image";
    }

    return result();
}