class Crowbar::Rules::SevenZipRule

Overview

Structure-preserving rule for 7-Zip (7z) archives. Preserves the 6-byte 7z file signature and 32-byte archive header structure, while mutating archive version, NextHeader offsets, NextHeader sizes, and compressed stream payloads, and automatically recalculating the StartHeader CRC32.

Defined in:

crowbar/rules/seven_zip.cr

Constant Summary

SEVEN_ZIP_SIGNATURE = Bytes[55, 122, 188, 175, 39, 28]

Instance Method Summary

Instance methods inherited from class Crowbar::Rule

apply(context : Context, buffer : Buffer) : Bool apply, description : String description, match?(buffer : Buffer) : Bool match?, name : String name, targets(*targets : Symbol) targets, weight : Float64 weight, weight=(weight : Float64) weight=

Constructor methods inherited from class Crowbar::Rule

new(weight : Float64 = 1.0) new

Instance Method Detail

def apply(context : Context, buffer : Buffer) : Bool #
Description copied from class Crowbar::Rule

Applies a structure-preserving transformation to the buffer


def description : String #

def match?(buffer : Buffer) : Bool #
Description copied from class Crowbar::Rule

Checks whether the buffer matches the format handled by this rule


def name : String #