Detect-It-Easy/db/Binary/archive_BZip.1.sg
DosX 9e621e1954 Rename and reorganize rule files
Renamed and moved numerous .sg files in the db directory to follow a more consistent naming convention and directory structure, grouping by type (e.g., compiler, cruncher, packer, protector, etc.). This improves maintainability and clarity of the signature database organization.
2026-01-25 11:20:39 +03:00

20 lines
No EOL
647 B
JavaScript

// Detect It Easy: detection rule file
// doc-ref: https://github.com/dsnet/compress/blob/master/doc/bzip2-format.pdf
meta("archive", "");
function detect() {
if (Binary.getSize() >= 9) {
if (Binary.compare("'BZ0'")) {
sName = "BZip1 compressed data (.BZ)"
bDetected = true;
} else if (Binary.compare("'BZh'") && Binary.compare("314159265359", 0x4)) {
sName = "BZip2 compressed data (.BZ2)"
bDetected = true;
}
if (bDetected && Binary.isVerbose()) {
sOptions = "block-size:" + Binary.getString(3, 1) + "00 kb";
}
}
return result();
}