// DIE's signature file
// Author: LinXP
// Status: WIP

init("archive","GZip data");

function detect(bShowType,bShowVersion,bShowOptions)
{
    if(Binary.getSize()>=9)
    {
	
        if(Binary.compare("1F8B"))
        {
            bDetected=true; 
            switch(Binary.read_uint8(0x02))
            {
            case 0: sOption("stored");     break;
            case 1: sOption("compressed"); break;
            case 2: sOption("packed");     break;
            case 3: sOption("lzhed");      break;
            case 8: sOption("deflate");    break;
            default: bDetected=false; 
            }
            if (bDetected) {
               switch(Binary.read_uint8(0x08))
               {
               case 2: sOption("best"); break;
               case 4: sOption("fast"); break;
               }
            }
        }
    }

    return result(bShowType,bShowVersion,bShowOptions);
}
