// DIE's signature file

init("archive","7-Zip");

function detect(bShowType,bShowVersion,bShowOptions)
{
    var nOffset=PE.getOverlayOffset();
    if(PE.compareOverlay("';!@Install@!UTF-8!'")||PE.compareOverlay("efbbbf';!@Install@!UTF-8!'"))
    {
        nOffset=PE.findSignature(nOffset,0x2000,"'7z'BCAF271C");
        if(nOffset!=-1)
        {
            bDetected=1;
        }
    }
    else if(PE.compare("'7z'BCAF271C",nOffset))
    {
        bDetected=1;
    }
    if(bDetected)
    {
        sVersion=PE.readByte(nOffset+6)+"."+PE.readByte(nOffset+7);
    }

    return result(bShowType,bShowVersion,bShowOptions);
}
