// https://github.com/horsicq/Detect-It-Easy signature file
// Author: Kaens (TG @kaens)
/* beautify ignore:start */

init("image", "Zlib-packed BMP file (.ZBM)");

function detect(bShowType, bShowVersion, bShowOptions) {

    // found in ex. Snails for Palm OS, .zbm are simply zlib archives at offset 0x10 of uncompressed bitmap images
    if(X.c("'ZBMP'") && X.c("78DA", 0x10) && (w=X.U32(4)) && w < 0x10000 && (h=X.U32(8)) && h < 0x10000) {
        bDetected = true; sOptions = w+'x'+h; //if(n=X.U32(0xC) sOption(n,'x'))
    }

    return result(bShowType, bShowVersion, bShowOptions);
}
/* beautify ignore:end */